>Dear FreeBSD'ers, > >I am running -CURRENT as of today (sources as of ~ 18:15 GMT). I can >see the following (a # sign precedes my comments): Can you see if this patch corrects the problem? -- Justin
Index: dev/aic7xxx/aic7xxx.c =================================================================== RCS file: /usr/cvs/src/sys/dev/aic7xxx/aic7xxx.c,v retrieving revision 1.63 diff -c -r1.63 aic7xxx.c *** dev/aic7xxx/aic7xxx.c 2001/01/05 19:15:36 1.63 --- dev/aic7xxx/aic7xxx.c 2001/01/08 04:48:36 *************** *** 487,494 **** printf("Sending Sense\n"); } #endif ! sg->addr = ahc->scb_data->sense_busaddr ! + (hscb->tag*sizeof(struct scsi_sense_data)); sg->len = ahc_get_sense_bufsize(ahc, scb); sg->len |= AHC_DMA_LAST_SEG; --- 487,493 ---- printf("Sending Sense\n"); } #endif ! sg->addr = ahc_get_sense_bufaddr(ahc, scb); sg->len = ahc_get_sense_bufsize(ahc, scb); sg->len |= AHC_DMA_LAST_SEG; Index: dev/aic7xxx/aic7xxx_freebsd.c =================================================================== RCS file: /usr/cvs/src/sys/dev/aic7xxx/aic7xxx_freebsd.c,v retrieving revision 1.16 diff -c -r1.16 aic7xxx_freebsd.c *** dev/aic7xxx/aic7xxx_freebsd.c 2000/12/20 01:11:37 1.16 --- dev/aic7xxx/aic7xxx_freebsd.c 2001/01/08 04:46:28 *************** *** 337,343 **** */ memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data)); memcpy(&ccb->csio.sense_data, ! &ahc->scb_data->sense[scb->hscb->tag], (scb->sg_list->len & AHC_SG_LEN_MASK) - ccb->csio.sense_resid); scb->io_ctx->ccb_h.status |= CAM_AUTOSNS_VALID; --- 337,343 ---- */ memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data)); memcpy(&ccb->csio.sense_data, ! ahc_get_sense_buf(ahc, scb), (scb->sg_list->len & AHC_SG_LEN_MASK) - ccb->csio.sense_resid); scb->io_ctx->ccb_h.status |= CAM_AUTOSNS_VALID; Index: dev/aic7xxx/aic7xxx_inline.h =================================================================== RCS file: /usr/cvs/src/sys/dev/aic7xxx/aic7xxx_inline.h,v retrieving revision 1.9 diff -c -r1.9 aic7xxx_inline.h *** dev/aic7xxx/aic7xxx_inline.h 2000/12/20 01:11:37 1.9 --- dev/aic7xxx/aic7xxx_inline.h 2001/01/08 04:55:49 *************** *** 200,205 **** --- 200,211 ---- static __inline void ahc_swap_with_next_hscb(struct ahc_softc *ahc, struct scb *scb); static __inline void ahc_queue_scb(struct ahc_softc *ahc, struct scb *scb); + static __inline struct scsi_sense_data * + ahc_get_sense_buf(struct ahc_softc *ahc, + struct scb *scb); + static __inline uint32_t + ahc_get_sense_bufaddr(struct ahc_softc *ahc, + struct scb *scb); /* * Determine whether the sequencer reported a residual *************** *** 344,349 **** --- 350,374 ---- if ((ahc->features & AHC_AUTOPAUSE) == 0) unpause_sequencer(ahc); } + } + + static __inline struct scsi_sense_data * + ahc_get_sense_buf(struct ahc_softc *ahc, struct scb *scb) + { + int offset; + + offset = scb - ahc->scb_data->scbarray; + return (&ahc->scb_data->sense[offset]); + } + + static __inline uint32_t + ahc_get_sense_bufaddr(struct ahc_softc *ahc, struct scb *scb) + { + int offset; + + offset = scb - ahc->scb_data->scbarray; + return (ahc->scb_data->sense_busaddr + + (offset * sizeof(struct scsi_sense_data))); } /************************** Interrupt Processing ******************************/