socsvn commit: r225305 - in soc2011/oleksandr/oleksandr-head/head/sys: cam dev/ata dev/usb/storage kern sys

oleksandr at FreeBSD.org oleksandr at FreeBSD.org
Sat Aug 20 15:35:49 UTC 2011


Author: oleksandr
Date: Sat Aug 20 15:35:46 2011
New Revision: 225305
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=225305

Log:
  Deleting test files and change some name of errors

Modified:
  soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c
  soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c
  soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c
  soc2011/oleksandr/oleksandr-head/head/sys/kern/subr_devstat.c
  soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h

Modified: soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c
==============================================================================
--- soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c	Sat Aug 20 15:22:47 2011	(r225304)
+++ soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c	Sat Aug 20 15:35:46 2011	(r225305)
@@ -1745,19 +1745,19 @@
                                    &error_code, &sense_key, &asc, &ascq);
                 switch(sense_key) {
                 case SSD_KEY_RECOVERED_ERROR:
-                        error_flag_sense = DEVSTAT_ERROR_RECOVERABLE;
+                        error_flag_sense = DEVSTAT_ERROR_RECOVERED_ERROR;
                         break;
                 case SSD_KEY_NOT_READY: 
                         error_flag_sense = DEVSTAT_ERROR_NOT_READY;
                         break;
                 case SSD_KEY_MEDIUM_ERROR:
-                        error_flag_sense = DEVSTAT_ERROR_MEDIA_ERROR;
+                        error_flag_sense = DEVSTAT_ERROR_MEDIUM_ERROR;
                         break;
                 case SSD_KEY_HARDWARE_ERROR: 
-                        error_flag_sense = DEVSTAT_ERROR_HARDWARE;
+                        error_flag_sense = DEVSTAT_ERROR_HARDWARE_ERROR;
                         break;
                 case SSD_KEY_ILLEGAL_REQUEST: 
-                        error_flag_sense = DEVSTAT_ERROR_ILLEGAL_REQ;
+                        error_flag_sense = DEVSTAT_ERROR_ILLEGAL_REQUEST;
                         break;
                 case SSD_KEY_UNIT_ATTENTION: 
                         error_flag_sense = DEVSTAT_ERROR_UNIT_ATTENTION;
@@ -1766,33 +1766,33 @@
                         error_flag_sense = DEVSTAT_ERROR_ABORTED_COMMAND;
                         break;
                 }
-        }
+        } 
         /*
          * If function code is equal to XPT_ATA_IO it means that the  
          * information about error can be found in the structure ataio.res.
          */
         if (ccb->ccb_h.func_code == XPT_ATA_IO && error_flag_ret != 0) {
-               if ((ccb->ataio.res.status & 0x20) && (!ccb->ataio.res.error))  
-                       error_flag_sense = DEVSTAT_ERROR_HARDWARE;
-               if (ccb->ataio.res.status & 0x10) {
-                       if (ccb->ataio.res.error && 0x02)
-                               error_flag_sense = DEVSTAT_ERROR_NOT_READY;
-                       if ((ccb->ataio.res.error && 0x40) ||
-                           (ccb->ataio.res.error && 0x01) ||
-                           (ccb->ataio.res.error && 0x10)) 
-                               error_flag_sense = DEVSTAT_ERROR_MEDIA_ERROR;
-                       if (ccb->ataio.res.error && 0x04) 
-                               error_flag_sense = DEVSTAT_ERROR_ILLEGAL_REQ;
-                       if ((ccb->ataio.res.error && 0x20) ||
-                           (ccb->ataio.res.error && 0x08))
-                               error_flag_sense = DEVSTAT_ERROR_UNIT_ATTENTION;
-                       if (ccb->ataio.res.error && 0x80)
-                               error_flag_sense = DEVSTAT_ERROR_ABORTED_COMMAND;
-               }
+                if ((ccb->ataio.res.status & 0x20) && (!ccb->ataio.res.error))  
+                        error_flag_sense = DEVSTAT_ERROR_HARDWARE_ERROR;
+                if (ccb->ataio.res.status & 0x10) {
+                        if (ccb->ataio.res.error && 0x02)
+                                error_flag_sense = DEVSTAT_ERROR_NOT_READY;
+                        if ((ccb->ataio.res.error && 0x40) ||
+                            (ccb->ataio.res.error && 0x01) ||
+                            (ccb->ataio.res.error && 0x10)) 
+                                error_flag_sense = DEVSTAT_ERROR_MEDIUM_ERROR;
+                        if (ccb->ataio.res.error && 0x04) 
+                                error_flag_sense = DEVSTAT_ERROR_ILLEGAL_REQUEST;
+                        if ((ccb->ataio.res.error && 0x20) ||
+                            (ccb->ataio.res.error && 0x08))
+                                error_flag_sense = DEVSTAT_ERROR_UNIT_ATTENTION;
+                        if (ccb->ataio.res.error && 0x80)
+                                error_flag_sense = DEVSTAT_ERROR_ABORTED_COMMAND;
+                }
         }
         /*
-         * If an error is present, search for an appropriate structure 
-         * in devstat and increase the corresponding counter of errors.
+         * If the error is present, search for appropriate structure 
+         * in devstat and increase the corresponding counters of errors.
          */
         if (error_flag_ret) {
                if ((device_error = devstat_search(

Modified: soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c
==============================================================================
--- soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c	Sat Aug 20 15:22:47 2011	(r225304)
+++ soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c	Sat Aug 20 15:35:46 2011	(r225305)
@@ -1612,8 +1612,6 @@
 	    (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	Sat Aug 20 15:22:47 2011	(r225304)
+++ soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c	Sat Aug 20 15:35:46 2011	(r225305)
@@ -2585,8 +2585,6 @@
 				page_list->length++;
 			}
 		}
-                KFAIL_POINT_CODE(DEBUG_FP, fail_usbdevice, 
-                                 ccb->ccb_h.status = RETURN_VALUE); 
 		xpt_done(ccb);
 		break;
 

Modified: soc2011/oleksandr/oleksandr-head/head/sys/kern/subr_devstat.c
==============================================================================
--- soc2011/oleksandr/oleksandr-head/head/sys/kern/subr_devstat.c	Sat Aug 20 15:22:47 2011	(r225304)
+++ soc2011/oleksandr/oleksandr-head/head/sys/kern/subr_devstat.c	Sat Aug 20 15:35:46 2011	(r225305)
@@ -385,18 +385,18 @@
                 ds->dev_error.read_error++;
         if ((error_flag | DEVSTAT_ERROR_OTHER_ERROR) == error_flag) 
                 ds->dev_error.other_error++;
-        if ((error_flag | DEVSTAT_ERROR_RECOVERABLE) == error_flag)
-                ds->dev_error.recoverable++;
+        if ((error_flag | DEVSTAT_ERROR_RECOVERED_ERROR) == error_flag)
+                ds->dev_error.recovered++;
         if ((error_flag | DEVSTAT_ERROR_NOT_READY) == error_flag)
                 ds->dev_error.not_ready++;
-        if ((error_flag | DEVSTAT_ERROR_MEDIA_ERROR) == error_flag)
-                ds->dev_error.media_error++;
-        if ((error_flag | DEVSTAT_ERROR_HARDWARE) == error_flag)
+        if ((error_flag | DEVSTAT_ERROR_MEDIUM_ERROR) == error_flag)
+                ds->dev_error.medium_error++;
+        if ((error_flag | DEVSTAT_ERROR_HARDWARE_ERROR) == error_flag)
                 ds->dev_error.hardware++;
-        if ((error_flag | DEVSTAT_ERROR_ILLEGAL_REQ) == error_flag)
-                ds->dev_error.illegal_req++;
+        if ((error_flag | DEVSTAT_ERROR_ILLEGAL_REQUEST) == error_flag)
+                ds->dev_error.illegal_request++;
         if ((error_flag | DEVSTAT_ERROR_UNIT_ATTENTION) == error_flag)
-                ds->dev_error.illegal_req++;
+                ds->dev_error.unit_attention++;
         if ((error_flag | DEVSTAT_ERROR_ABORTED_COMMAND) == error_flag)
                 ds->dev_error.aborted_command++;
 }

Modified: soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h
==============================================================================
--- soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h	Sat Aug 20 15:22:47 2011	(r225304)
+++ soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h	Sat Aug 20 15:35:46 2011	(r225305)
@@ -103,11 +103,11 @@
         DEVSTAT_ERROR_READ_ERROR      = 0x004, 
         DEVSTAT_ERROR_WRITE_ERROR     = 0x008,
         DEVSTAT_ERROR_OTHER_ERROR     = 0x010,
-        DEVSTAT_ERROR_RECOVERABLE     = 0x020,
+        DEVSTAT_ERROR_RECOVERED_ERROR = 0x020,
         DEVSTAT_ERROR_NOT_READY       = 0x040,
-        DEVSTAT_ERROR_MEDIA_ERROR     = 0x080,
-        DEVSTAT_ERROR_HARDWARE        = 0x100,
-        DEVSTAT_ERROR_ILLEGAL_REQ     = 0x200,
+        DEVSTAT_ERROR_MEDIUM_ERROR    = 0x080,
+        DEVSTAT_ERROR_HARDWARE_ERROR  = 0x100,
+        DEVSTAT_ERROR_ILLEGAL_REQUEST = 0x200,
         DEVSTAT_ERROR_UNIT_ATTENTION  = 0x400,
         DEVSTAT_ERROR_ABORTED_COMMAND = 0x800
 } devstat_error_flags;
@@ -153,14 +153,14 @@
         int         read_error;
         int         write_error;
         int         other_error;
-        int         recoverable;
+        int         recovered;
         int         not_ready;
-        int         media_error;
+        int         medium_error;
         int         hardware;
-        int         illegal_req;
+        int         illegal_request;
         int         unit_attention;
         int         aborted_command;
-} devstat_device_error;
+} devstat_device_error;  
 /*
  * XXX: Next revision should add
  *	off_t		offset[DEVSTAT_N_TRANS_FLAGS];


More information about the svn-soc-all mailing list