kern/145960: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Thu Jul 14 20:20:04 UTC 2011


The following reply was made to PR kern/145960; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: kern/145960: commit references a PR
Date: Thu, 14 Jul 2011 20:11:41 +0000 (UTC)

 Author: jhb
 Date: Thu Jul 14 20:11:27 2011
 New Revision: 224039
 URL: http://svn.freebsd.org/changeset/base/224039
 
 Log:
   Use MFI_STAT_* constants for cmd_status field values rather than magic
   numbers in a few places.
   
   PR:		bin/145960
   Submitted by:	gcooper
   MFC after:	1 week
 
 Modified:
   head/sys/dev/mfi/mfi.c
 
 Modified: head/sys/dev/mfi/mfi.c
 ==============================================================================
 --- head/sys/dev/mfi/mfi.c	Thu Jul 14 19:25:42 2011	(r224038)
 +++ head/sys/dev/mfi/mfi.c	Thu Jul 14 20:11:27 2011	(r224039)
 @@ -1149,7 +1149,8 @@ mfi_aen_complete(struct mfi_command *cm)
  	if (sc->mfi_aen_cm == NULL)
  		return;
  
 -	if (sc->mfi_aen_cm->cm_aen_abort || hdr->cmd_status == 0xff) {
 +	if (sc->mfi_aen_cm->cm_aen_abort ||
 +	    hdr->cmd_status == MFI_STAT_INVALID_STATUS) {
  		sc->mfi_aen_cm->cm_aen_abort = 0;
  		aborted = 1;
  	} else {
 @@ -1405,7 +1406,7 @@ mfi_bio_complete(struct mfi_command *cm)
  	hdr = &cm->cm_frame->header;
  	sc = cm->cm_sc;
  
 -	if ((hdr->cmd_status != 0) || (hdr->scsi_status != 0)) {
 +	if ((hdr->cmd_status != MFI_STAT_OK) || (hdr->scsi_status != 0)) {
  		bio->bio_flags |= BIO_ERROR;
  		bio->bio_error = EIO;
  		device_printf(sc->mfi_dev, "I/O error, status= %d "
 @@ -1549,7 +1550,7 @@ mfi_send_frame(struct mfi_softc *sc, str
  		cm->cm_timestamp = time_uptime;
  		mfi_enqueue_busy(cm);
  	} else {
 -		hdr->cmd_status = 0xff;
 +		hdr->cmd_status = MFI_STAT_INVALID_STATUS;
  		hdr->flags |= MFI_FRAME_DONT_POST_IN_REPLY_QUEUE;
  	}
  
 @@ -1574,14 +1575,14 @@ mfi_send_frame(struct mfi_softc *sc, str
  		return (0);
  
  	/* This is a polled command, so busy-wait for it to complete. */
 -	while (hdr->cmd_status == 0xff) {
 +	while (hdr->cmd_status == MFI_STAT_INVALID_STATUS) {
  		DELAY(1000);
  		tm -= 1;
  		if (tm <= 0)
  			break;
  	}
  
 -	if (hdr->cmd_status == 0xff) {
 +	if (hdr->cmd_status == MFI_STAT_INVALID_STATUS) {
  		device_printf(sc->mfi_dev, "Frame %p timed out "
  			      "command 0x%X\n", hdr, cm->cm_frame->dcmd.opcode);
  		return (ETIMEDOUT);
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-bugs mailing list