Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 2010 14:18:17 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 174145 for review
Message-ID:  <201002021418.o12EIH5i064702@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=174145

Change 174145 by mav@mav_mavtest on 2010/02/02 14:17:19

	- Add forgotten part of previous ATAPI-related patch.
	- Use functions instead of direct refcount manupulation. 

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#147 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#147 (text+ko) ====

@@ -1201,8 +1201,10 @@
 		printf(" (");
 		if (ata->valid & CTS_ATA_VALID_MODE)
 			printf("%s, ", ata_mode2string(ata->mode));
+		if ((ata->valid & CTS_ATA_VALID_ATAPI) && ata->atapi != 0)
+			printf("ATAPI %dbytes, ", ata->atapi);
 		if (ata->valid & CTS_ATA_VALID_BYTECOUNT)
-			printf("PIO size %dbytes", ata->bytecount);
+			printf("PIO %dbytes", ata->bytecount);
 		printf(")");
 	}
 	if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) {
@@ -1214,8 +1216,10 @@
 			printf("SATA %d.x, ", sata->revision);
 		if (sata->valid & CTS_SATA_VALID_MODE)
 			printf("%s, ", ata_mode2string(sata->mode));
+		if ((sata->valid & CTS_ATA_VALID_ATAPI) && sata->atapi != 0)
+			printf("ATAPI %dbytes, ", sata->atapi);
 		if (sata->valid & CTS_SATA_VALID_BYTECOUNT)
-			printf("PIO size %dbytes", sata->bytecount);
+			printf("PIO %dbytes", sata->bytecount);
 		printf(")");
 	}
 	if (path->device->inq_flags & SID_CmdQue
@@ -2881,7 +2885,7 @@
 			if (csa->event_enable == 0) {
 				SLIST_REMOVE(async_head, cur_entry,
 					     async_node, links);
-				csa->ccb_h.path->device->refcount--;
+				xpt_release_device(csa->ccb_h.path->device);
 				free(cur_entry, M_CAMXPT);
 			} else {
 				cur_entry->event_enable = csa->event_enable;
@@ -2897,7 +2901,7 @@
 			cur_entry->callback_arg = csa->callback_arg;
 			cur_entry->callback = csa->callback;
 			SLIST_INSERT_HEAD(async_head, cur_entry, links);
-			csa->ccb_h.path->device->refcount++;
+			xpt_acquire_device(csa->ccb_h.path->device);
 		}
 
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002021418.o12EIH5i064702>