From owner-freebsd-current Sun Jan 7 22:26: 0 2001 Delivered-To: freebsd-current@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 3531437B6F4 for ; Sun, 7 Jan 2001 22:18:48 -0800 (PST) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.0/8.9.3) with ESMTP id f086Hks69274; Sun, 7 Jan 2001 23:18:12 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200101080618.f086Hks69274@aslan.scsiguy.com> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Salvo Bartolotta Cc: freebsd-current@FreeBSD.ORG Subject: Re: SCSI CD recorder no longer attached; minor issues In-Reply-To: Your message of "Mon, 08 Jan 2001 02:55:06 +0100." <01010802550600.00359@bartequi.ottodomain.org> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_-17191975020" Date: Sun, 07 Jan 2001 23:17:46 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multipart MIME message. --==_Exmh_-17191975020 Content-Type: text/plain; charset=us-ascii >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 --==_Exmh_-17191975020 Content-Type: text/plain ; name="diffs"; charset=us-ascii Content-Description: diffs Content-Disposition: attachment; filename="diffs" 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 ******************************/ --==_Exmh_-17191975020-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message