Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 1995 23:07:41 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        imp@village.org, julian@TFS.COM
Cc:        dleeds@eagle.ais.net, hackers@FreeBSD.org, questions@FreeBSD.org
Subject:   Re: ultrastor 34f
Message-ID:  <199503201307.XAA18103@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Of course we could always break it for you if you wish :)

>> : I want to know if the ultrastor 34f controller (scsi-2) VL will work with 
>> : freebsd, I heard it does, but want to know if it is stable and works
>> : well before I buy it.
>> 
>> Rock solid stable since about version 1.0 GAMMA or so.

It's broken enough already.  I used these patches (by John Mackin) in 1.1.5
and in 2.x to fix the handling of sense errors.  Without these patches, the
driver happily reads and writes to nonexistent media and beyond EOF on
tapes (as if from and to /dev/zero).  I don't know anything about the
hardware so I can't check the changes.

Bruce

*** ultra14f.c~	Fri Mar 17 20:22:18 1995
--- ultra14f.c	Fri Mar 17 20:22:55 1995
***************
*** 634,641 ****
  	 * into the xfer and call whoever started it
  	 */
! 	if ((mscp->ha_status == UHA_NO_ERR) || (xs->flags & SCSI_ERR_OK)) {	/* All went correctly  OR errors expected */
! 		xs->resid = 0;
! 		xs->error = 0;
! 	} else {
  
  		s1 = &(mscp->mscp_sense);
--- 634,639 ----
  	 * into the xfer and call whoever started it
  	 */
! 	if (((mscp->ha_status != UHA_NO_ERR) || (mscp->targ_status != SCSI_OK))
! 	 && ((xs->flags & SCSI_ERR_OK) == 0)) {
  
  		s1 = &(mscp->mscp_sense);
***************
*** 644,650 ****
  		if (mscp->ha_status != UHA_NO_ERR) {
  			switch (mscp->ha_status) {
! 			case UHA_SBUS_TIMEOUT:		/* No response */
  				SC_DEBUG(xs->sc_link, SDEV_DB3,
! 				    ("timeout reported back\n"));
  				xs->error = XS_TIMEOUT;
  				break;
--- 642,650 ----
  		if (mscp->ha_status != UHA_NO_ERR) {
  			switch (mscp->ha_status) {
! 			case UHA_SBUS_ABORT_ERR:
! 			case UHA_SBUS_TIMEOUT:		/* No sel response */
  				SC_DEBUG(xs->sc_link, SDEV_DB3,
! 				    ("abort or timeout; ha_status 0x%x\n",
! 					mscp->ha_status));
  				xs->error = XS_TIMEOUT;
  				break;
***************
*** 654,685 ****
  				xs->error = XS_DRIVER_STUFFUP;
  				break;
- 			case UHA_BAD_SG_LIST:
- 				SC_DEBUG(xs->sc_link, SDEV_DB3,
- 				    ("bad sg list reported back\n"));
- 				xs->error = XS_DRIVER_STUFFUP;
- 				break;
  			default:	/* Other scsi protocol messes */
  				xs->error = XS_DRIVER_STUFFUP;
! 				SC_DEBUG(xs->sc_link, SDEV_DB3,
! 				    ("unexpected ha_status: %x\n",
! 					mscp->ha_status));
  			}
  		} else {
! 
! 			if (mscp->targ_status != 0)
! /*
!  * I have no information for any possible value of target status field
!  * other than 0 means no error!! So I guess any error is unexpected in that
!  * event!!
!  */
! 
! 			{
! 				SC_DEBUG(xs->sc_link, SDEV_DB3,
! 				    ("unexpected targ_status: %x\n",
! 					mscp->targ_status));
  				xs->error = XS_DRIVER_STUFFUP;
  			}
  		}
!       }
      done:
  	xs->flags |= ITSDONE;
--- 654,689 ----
  				xs->error = XS_DRIVER_STUFFUP;
  				break;
  			default:	/* Other scsi protocol messes */
  				xs->error = XS_DRIVER_STUFFUP;
! 				printf("uha%d: unexpected ha_status 0x%x (target status 0x%x)\n",
! 					unit, mscp->ha_status,
! 					mscp->targ_status);
! 				break;
  			}
  		} else {
! 			/* Target status problem */
! 			SC_DEBUG(xs->sc_link, SDEV_DB3, ("target err 0x%x\n",
! 				mscp->targ_status));
! 			switch (mscp->targ_status) {
! 			case 0x02:
! 				*s2 = *s1;
! 				xs->error = XS_SENSE;
! 				break;
! 			case 0x08:
! 				xs->error = XS_BUSY;
! 				break;
! 			default:
! 				printf("uha%d: unexpected targ_status 0x%x\n",
! 					unit, mscp->targ_status);
  				xs->error = XS_DRIVER_STUFFUP;
+ 				break;
  			}
  		}
! 	}
! 	else {
! 		/* All went correctly  OR  errors expected */
! 		xs->resid = 0;
! 		xs->error = 0;
! 	}
      done:
  	xs->flags |= ITSDONE;



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