Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Dec 1998 18:58:09 -0700 (MST)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        bsdx@spawnet.com (Adam McDougall)
Cc:        scsi@FreeBSD.ORG
Subject:   Re: tosha reports random errors after transition to CAM
Message-ID:  <199812020158.SAA23279@panzer.plutotech.com>
In-Reply-To: <36648612.693004F7@spawnet.com> from Adam McDougall at "Dec 1, 98 07:13:06 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

--ELM912563889-23232-0_
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Adam McDougall wrote...
> Kenneth D. Merry wrote:
> > Adam McDougall wrote...
> > Justin suspects that the drive may not be handling 6-byte reads and writes
> > properly.
> > 
> > > dpt0: <DPT Caching SCSI RAID Controller> rev 0x02 int a irq 12 on
> > > pci0.17.0
> > > dpt0: DPT PM2144UW FW Rev. 07LY, 1 channel, 64 CCBs
> > > da0: <QUANTUM VIKING 4.5 WSE 8808> Fixed Direct Access SCSI2 device
> > > da0: Tagged Queueing Enabled
> > > da0: 4345MB (8899736 512 byte sectors: 255H 63S/T 553C)
> > 
> > Try this --  go into sys/cam/scsi/scsi_da.c, and on about line 1079, adjust
> > the minimum_cmd_size for the read and write commands to 10 bytes.
> > 
> 
> THANK YOU!!!! works PERFECT now :) 
> 
> So, what does this mean the problem might be? 

It means you're the victim of yet another high quality Quantum drive.
(i.e., it's a firmware bug)  Next time, buy Seagate or IBM.

Try the attached patch, and see if it works for you.  If it does, I'll
probably commit it or something close to it.

Also -- please CC your mail to me, and don't send it just to the list.
You may get a faster response that way.

Ken
-- 
Kenneth Merry
ken@plutotech.com

--ELM912563889-23232-0_
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: attachment; filename=scsi_da.no_6_byte.120198
Content-Description: scsi_da.no_6_byte.120198
Content-Transfer-Encoding: 7bit

==== //depot/cam/sys/cam/scsi/scsi_da.c#89 - /usr/home/ken/perforce/cam/sys/cam/scsi/scsi_da.c ====
*** /tmp/tmp.12080.0	Tue Dec  1 18:52:26 1998
--- /usr/home/ken/perforce/cam/sys/cam/scsi/scsi_da.c	Tue Dec  1 18:40:29 1998
***************
*** 75,81 ****
  
  typedef enum {
  	DA_Q_NONE		= 0x00,
! 	DA_Q_NO_SYNC_CACHE	= 0x01
  } da_quirks;
  
  typedef enum {
--- 75,82 ----
  
  typedef enum {
  	DA_Q_NONE		= 0x00,
! 	DA_Q_NO_SYNC_CACHE	= 0x01,
! 	DA_Q_NO_6_BYTE		= 0x02
  } da_quirks;
  
  typedef enum {
***************
*** 107,112 ****
--- 108,114 ----
  	da_state state;
  	da_flags flags;	
  	da_quirks quirks;
+ 	int	 minimum_cmd_size;
  	int	 ordered_tag_count;
  	struct	 disk_params params;
  	struct	 diskslices *dk_slices;	/* virtual drives */
***************
*** 146,151 ****
--- 148,170 ----
  		 */
  		{T_DIRECT, SIP_MEDIA_FIXED, "NEC", "D3847*", "*"},
  		/*quirks*/ DA_Q_NO_SYNC_CACHE
+ 	},
+ 	{
+ 		/*
+ 		 * Doesn't work correctly with 6 byte reads/writes.
+ 		 * Returns illegal request, and points to byte 9 of the
+ 		 * 6-byte CDB.
+ 		 * Reported by:  Adam McDougall <bsdx@spawnet.com>
+ 		 */
+ 		{T_DIRECT, SIP_MEDIA_FIXED, "QUANTUM", "VIKING 4*", "*"},
+ 		/*quirks*/ DA_Q_NO_6_BYTE
+ 	},
+ 	{
+ 		/*
+ 		 * See above.
+ 		 */
+ 		{T_DIRECT, SIP_MEDIA_FIXED, "QUANTUM", "VIKING 2*", "*"},
+ 		/*quirks*/ DA_Q_NO_6_BYTE
  	}
  };
  
***************
*** 648,654 ****
  				MSG_ORDERED_Q_TAG,
  				/*read*/FALSE,
  				/*byte2*/0,
! 				/*minimum_cmd_size*/ 6,
  				blknum,
  				blkcnt,
  				/*data_ptr*/CADDR1,
--- 667,673 ----
  				MSG_ORDERED_Q_TAG,
  				/*read*/FALSE,
  				/*byte2*/0,
! 				/*minimum_cmd_size*/ softc->minimum_cmd_size,
  				blknum,
  				blkcnt,
  				/*data_ptr*/CADDR1,
***************
*** 977,982 ****
--- 996,1006 ----
  	else
  		softc->quirks = DA_Q_NONE;
  
+ 	if (softc->quirks & DA_Q_NO_6_BYTE)
+ 		softc->minimum_cmd_size = 10;
+ 	else
+ 		softc->minimum_cmd_size = 6;
+ 
  	/*
  	 * Block our timeout handler while we
  	 * add this softc to the dev list.
***************
*** 1076,1082 ****
  					tag_code,
  					bp->b_flags & B_READ,
  					/*byte2*/0,
! 					/*minimum_cmd_size*/ 6,
  					bp->b_pblkno,
  					bp->b_bcount / softc->params.secsize,
  					bp->b_data,
--- 1100,1106 ----
  					tag_code,
  					bp->b_flags & B_READ,
  					/*byte2*/0,
! 					softc->minimum_cmd_size,
  					bp->b_pblkno,
  					bp->b_bcount / softc->params.secsize,
  					bp->b_data,

--ELM912563889-23232-0_--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



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