Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
qemu-linux-user.6353
0072-ahci-add-ncq_err-helper.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0072-ahci-add-ncq_err-helper.patch of Package qemu-linux-user.6353
From c402d09708ab31542eead8de7b7fcd28c9ee7e96 Mon Sep 17 00:00:00 2001 From: John Snow <jsnow@redhat.com> Date: Sat, 4 Jul 2015 02:06:03 -0400 Subject: [PATCH] ahci: add ncq_err helper Set some appropriate error bits for NCQ for us. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1435016308-6150-4-git-send-email-jsnow@redhat.com (cherry picked from commit a55c8231d04e3023bc5c3da9290f01e7d6989a94) [LM: BSC#961333 CVE-2016-1568] Signed-off-by: Lin Ma <lma@suse.com> --- hw/ide/ahci.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 833fd45faf..c9f6a344b5 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -865,6 +865,15 @@ out: return r; } +static void ncq_err(NCQTransferState *ncq_tfs) +{ + IDEState *ide_state = &ncq_tfs->drive->port.ifs[0]; + + ide_state->error = ABRT_ERR; + ide_state->status = READY_STAT | ERR_STAT; + ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag); +} + static void ncq_cb(void *opaque, int ret) { NCQTransferState *ncq_tfs = (NCQTransferState *)opaque; @@ -877,10 +886,7 @@ static void ncq_cb(void *opaque, int ret) ncq_tfs->drive->port_regs.scr_act &= ~(1 << ncq_tfs->tag); if (ret < 0) { - /* error */ - ide_state->error = ABRT_ERR; - ide_state->status = READY_STAT | ERR_STAT; - ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag); + ncq_err(ncq_tfs); } else { ide_state->status = READY_STAT | SEEK_STAT; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor