Date: Mon, 6 Mar 2017 14:22:58 -0800 From: Mark Millard <markmi@dsl-only.net> To: svn-src-head@freebsd.org Subject: Re: svn commit: r314624 - in head/sys/cam: . scsi [Prevented PowerMac G5 so-called "Quad Core" boot completion] Message-ID: <F8C6797E-21DE-45A2-BE0A-A29B1E21737B@dsl-only.net> In-Reply-To: <00787DC4-F3AF-4378-BF55-05581DCB88E8@dsl-only.net> References: <00787DC4-F3AF-4378-BF55-05581DCB88E8@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Just for the record: scsi_pass.c -r314624 is the problem file vintage of the two files: scsi_pass.c -r314624 (new) and cam_xpt.c -r314283 (old): fails. cam_xpt.c -r314624 (new) and scsi_pass.c -r308451 (old) : works fine so far. Prior results: cam_xpt.c and scsi_pass.c both being -r314624 (both new): fails cam_xpt.c -r314283 and scsi_pass.c -r308451 (both old): works fine. So that gives a clue for where cleanup might be needed in order to allow -r314624 use (both files). === Mark Millard markmi at dsl-only.net On 2017-Mar-6, at 2:35 AM, Mark Millard <markmi at dsl-only.net> wrote: > [I should have CC'd svn-src-head in the first place.] > > On 2017-Mar-6, at 2:05 AM, Mark Millard <markmi at dsl-only.net> wrote: > >> On 2017-Mar-6, at 1:37 AM, Mark Millard <markmi at dsl-only.net> wrote: >> >>> When I tried to jump from head -r314479 to -r314687 the -r314687 kernel >>> the result failed by always(?) getting: >>> >>> CAM status: Command timeout >>> >>> for: >>> >>> ATAPI_IDENTIFY >>> INQUIRY >>> DSM TRIM >>> READ_DMA48 >>> SETFEATURES ENABLE RCACHE >>> WRITE_DMA48 >>> etc. >>> >>> at: >>> >>> ada0:ata2:0:0:0 >>> aprobe0:ata0:0:0:0 >>> >>> Booting with the older -r314479 works fine (same -r314687 world). >>> >>> [FYI: It is a ufs context.] >>> >>> >>> The only thing that looks likely to me for >>> the change in behavior is. . . >>> >>> Author: markj >>> Date: Fri Mar 3 20:51:57 2017 >>> New Revision: 314624 >>> URL: >>> https://svnweb.freebsd.org/changeset/base/314624 >>> >>> >>> Log: >>> Reject userland CCBs that have CAM_UNLOCKED set. >>> >>> CAM_UNLOCKED is internal flag and cannot correctly be set by userland. >>> Return EINVAL from CAMIOCOMMAND and CAMIOQUEUE if it is set. >>> >>> Also fix leaks in some of the error paths for CAMIOQUEUE. >>> >>> PR: 215356 >>> Reviewed by: ken, mav >>> MFC after: 1 week >>> Differential Revision: >>> https://reviews.freebsd.org/D9869 >>> >>> >>> Modified: >>> head/sys/cam/cam_xpt.c >>> head/sys/cam/scsi/scsi_pass.c >>> >>> >>> >>> [This may just mean that it exposes other problems.] >> >> Yep: reverting the two files allowed the PowerMac G5 so-called >> "Quad Core" to boot fully and I could log in. >> >> It appears that if such powerpc64 machines are to stay bootable >> then other things need to be cleaned up before the two updated >> files from -r314624 should be used. >> >> Should the 2 files be reverted until other things are cleaned up? > > An interesting note is where CAM_UNLOCKED occurs (this is from > after reverting the 2 files relative to the -r314687 that I > started with): > > # grep -r CAM_UNLOCKED /usr/src/* | more > /usr/src/sys/cam/cam_periph.c: KASSERT((ccb->ccb_h.flags & CAM_UNLOCKED) == 0, > /usr/src/sys/cam/scsi/scsi_da.c: start_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/scsi/scsi_da.c: ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/scsi/scsi_da.c: ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/scsi/scsi_da.c: ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/scsi/scsi_xpt.c: work_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/scsi/scsi_xpt.c: request_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/scsi/scsi_xpt.c: request_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/scsi/scsi_xpt.c: request_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/nvme/nvme_da.c: start_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/nvme/nvme_da.c: start_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/cam_ccb.h: CAM_UNLOCKED = 0x80000000 /* Call callback without lock. */ > /usr/src/sys/cam/ata/ata_da.c: start_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/ata/ata_da.c: start_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/ata/ata_xpt.c: work_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/ata/ata_xpt.c: request_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/ctl/scsi_ctl.c: new_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/ctl/scsi_ctl.c: new_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/ctl/scsi_ctl.c: start_ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/ctl/scsi_ctl.c: KASSERT((done_ccb->ccb_h.flags & CAM_UNLOCKED) != 0, > /usr/src/sys/cam/ctl/scsi_ctl.c: ("CCB in ctlfedone() without CAM_UNLOCKED flag")); > /usr/src/sys/cam/ctl/scsi_ctl.c: csio->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/cam_xpt.c: ccb->ccb_h.flags |= CAM_UNLOCKED; > /usr/src/sys/cam/cam_xpt.c: if ((ccb_h->flags & CAM_UNLOCKED) == 0) { > > > === > Mark Millard > markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F8C6797E-21DE-45A2-BE0A-A29B1E21737B>
