RE: GEOM panic on boot when ahd cannot find disk

From: Don Bowman <don_at_sandvine.com>
Date: Thu, 22 May 2003 11:51:07 -0400
From: Gavin Atkinson [mailto:gavin_at_ury.york.ac.uk]
> On Thu, 22 May 2003, Gavin Atkinson wrote:
> 
> > The system fails to detect the drive (a Fujitsu MAP3367NC) 
> attached to an
> > Adaptec AIC7902 controller,
> 
> As a follow up to this, 4.8-STABLE-20030522-JPSNAP detects 
> the controller
> and SCSI drive correctly.
> 
> Gavin

There is a bug in the AIC7xxx driver which will cause this
behaviour.
I received a patch from justin gibbs, which he indicated
he was going to commit. I've attached the patch below, this
can be applied against the CURRENT aic7xxx driver, and then
that can be pulled into 4.8 directly.

==== //depot/aic7xxx/aic7xxx/aic79xx.c#191 -
/usr/src/sys/dev/aic7xxx/aic79xx.c ====
*** /tmp/tmp.537.0	Thu May 15 19:29:44 2003
--- /usr/src/sys/dev/aic7xxx/aic79xx.c	Thu May 15 19:22:02 2003
***************
*** 5722,5727 ****
--- 5722,5728 ----
  		next_scb->sg_list = segs;
  		next_scb->sense_data = sense_data;
  		next_scb->sense_busaddr = sense_busaddr;
+ 		memset(hscb, 0, sizeof(*hscb));
  		next_scb->hscb = hscb;
  		hscb->hscb_busaddr = ahd_htole32(hscb_busaddr);
  
***************
*** 8279,8286 ****
  	download_consts[PKT_OVERRUN_BUFOFFSET] =
  		(ahd->overrun_buf - (uint8_t *)ahd->qoutfifo) / 256;
  	download_consts[SCB_TRANSFER_SIZE] = SCB_TRANSFER_SIZE_1BYTE_LUN;
- 	if ((ahd->bugs & AHD_PKT_LUN_BUG) != 0)
- 		download_consts[SCB_TRANSFER_SIZE] =
SCB_TRANSFER_SIZE_FULL_LUN;
  	cur_patch = patches;
  	downloaded = 0;
  	skip_addr = 0;
--- 8280,8285 ----
==== //depot/aic7xxx/aic7xxx/aic79xx.seq#92 -
/usr/src/sys/dev/aic7xxx/aic79xx.seq ====
*** /tmp/tmp.537.1	Thu May 15 19:29:44 2003
--- /usr/src/sys/dev/aic7xxx/aic79xx.seq	Thu May 15 19:16:55 2003
***************
*** 261,266 ****
--- 261,275 ----
  	clr	A;
  	add	CMDS_PENDING, 1;
  	adc	CMDS_PENDING[1], A;
+ 	if ((ahd->bugs & AHD_PKT_LUN_BUG) != 0) {
+ 		/*
+ 		 * "Short Luns" are not placed into outgoing LQ
+ 		 * packets in the correct byte order.  Use a full
+ 		 * sized lun field instead and fill it with the
+ 		 * one byte of lun information we support.
+ 		 */
+ 		mov	SCB_PKT_LUN[6], SCB_LUN;
+ 	}
  	/*
  	 * The FIFO use count field is shared with the
  	 * tag set by the host so that our SCB dma engine
==== //depot/aic7xxx/aic7xxx/aic79xx_inline.h#48 -
/usr/src/sys/dev/aic7xxx/aic79xx_inline.h ====
*** /tmp/tmp.537.2	Thu May 15 19:29:44 2003
--- /usr/src/sys/dev/aic7xxx/aic79xx_inline.h	Thu May 15 19:09:49 2003
***************
*** 272,281 ****
  	if ((scb->flags & SCB_PACKETIZED) != 0) {
  		/* XXX what about ACA??  It is type 4, but TAG_TYPE == 0x3.
*/
  		scb->hscb->task_attribute= scb->hscb->control &
SCB_TAG_TYPE;
- 		/*
- 		 * For Rev A short lun workaround.
- 		 */
- 		scb->hscb->pkt_long_lun[6] = scb->hscb->lun;
  	}
  
  	if (scb->hscb->cdb_len <= MAX_CDB_LEN_WITH_SENSE_ADDR
--- 272,277 ----
Received on Thu May 22 2003 - 06:51:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:08 UTC