Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2017 21:59:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-scsi@FreeBSD.org
Subject:   [Bug 224250] Sending SCSI command to ATA device makes kernel triple fault.
Message-ID:  <bug-224250-5312-vkEWVqXlV8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-224250-5312@https.bugs.freebsd.org/bugzilla/>
References:  <bug-224250-5312@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224250

--- Comment #18 from Scott Long <scottl@FreeBSD.org> ---
Comment on attachment 188806
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D188806
C snippet

The assertion is here:

VirtualBox-4.3.22/src/VBox/Devices/Storage/DevATA.cpp:5293
                if (s->uTxDir =3D=3D PDMBLOCKTXDIR_FROM_DEVICE)
                    AssertRelease(bm->u8Cmd & BM_CMD_WRITE);

I'm a bit confused, I believe that the ATA driver sets this bit here:

src/sys/dev/ata/ata_all.c
                if ((ccb->ccb_h.flags & CAM_DIR_MASK) =3D=3D CAM_DIR_IN)
                        request->flags |=3D ATA_R_READ;
and
src/sys/dev/ata/ata_pci.c
    ATA_IDX_OUTB(ch, ATA_BMCMD_PORT,
                 (ATA_IDX_INB(ch, ATA_BMCMD_PORT) & ~ATA_BMCMD_WRITE_READ) |
                 ((request->flags & ATA_R_READ) ? ATA_BMCMD_WRITE_READ : 0)|
                 ATA_BMCMD_START_STOP);

Maybe this isn't going through ata_pci_dmastart(), or maybe the flags are
getting cleared/not copied correctly prior?  I don't have time to look into=
 it
further today.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224250-5312-vkEWVqXlV8>