[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/30] ahci: fix spacing damage on ahci_port_write
From: |
John Snow |
Subject: |
[Qemu-devel] [PULL 07/30] ahci: fix spacing damage on ahci_port_write |
Date: |
Fri, 8 Jun 2018 13:47:10 -0400 |
Churn.
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
[Fix patchew/checkpatch nit. --js]
Signed-off-by: John Snow <address@hidden>
---
hw/ide/ahci.c | 142 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 71 insertions(+), 71 deletions(-)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 1107a9b118..a19f46c301 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -279,85 +279,85 @@ static int ahci_cond_start_engines(AHCIDevice *ad)
return 0;
}
-static void ahci_port_write(AHCIState *s, int port, int offset, uint32_t val)
+static void ahci_port_write(AHCIState *s, int port, int offset, uint32_t val)
{
AHCIPortRegs *pr = &s->dev[port].port_regs;
trace_ahci_port_write(s, port, offset, val);
switch (offset) {
- case PORT_LST_ADDR:
- pr->lst_addr = val;
- break;
- case PORT_LST_ADDR_HI:
- pr->lst_addr_hi = val;
- break;
- case PORT_FIS_ADDR:
- pr->fis_addr = val;
- break;
- case PORT_FIS_ADDR_HI:
- pr->fis_addr_hi = val;
- break;
- case PORT_IRQ_STAT:
- pr->irq_stat &= ~val;
- ahci_check_irq(s);
- break;
- case PORT_IRQ_MASK:
- pr->irq_mask = val & 0xfdc000ff;
- ahci_check_irq(s);
- break;
- case PORT_CMD:
- /* Block any Read-only fields from being set;
- * including LIST_ON and FIS_ON.
- * The spec requires to set ICC bits to zero after the ICC change
- * is done. We don't support ICC state changes, therefore always
- * force the ICC bits to zero.
- */
- pr->cmd = (pr->cmd & PORT_CMD_RO_MASK) |
- (val & ~(PORT_CMD_RO_MASK|PORT_CMD_ICC_MASK));
+ case PORT_LST_ADDR:
+ pr->lst_addr = val;
+ break;
+ case PORT_LST_ADDR_HI:
+ pr->lst_addr_hi = val;
+ break;
+ case PORT_FIS_ADDR:
+ pr->fis_addr = val;
+ break;
+ case PORT_FIS_ADDR_HI:
+ pr->fis_addr_hi = val;
+ break;
+ case PORT_IRQ_STAT:
+ pr->irq_stat &= ~val;
+ ahci_check_irq(s);
+ break;
+ case PORT_IRQ_MASK:
+ pr->irq_mask = val & 0xfdc000ff;
+ ahci_check_irq(s);
+ break;
+ case PORT_CMD:
+ /* Block any Read-only fields from being set;
+ * including LIST_ON and FIS_ON.
+ * The spec requires to set ICC bits to zero after the ICC change
+ * is done. We don't support ICC state changes, therefore always
+ * force the ICC bits to zero.
+ */
+ pr->cmd = (pr->cmd & PORT_CMD_RO_MASK) |
+ (val & ~(PORT_CMD_RO_MASK | PORT_CMD_ICC_MASK));
- /* Check FIS RX and CLB engines */
- ahci_cond_start_engines(&s->dev[port]);
+ /* Check FIS RX and CLB engines */
+ ahci_cond_start_engines(&s->dev[port]);
- /* XXX usually the FIS would be pending on the bus here and
- issuing deferred until the OS enables FIS receival.
- Instead, we only submit it once - which works in most
- cases, but is a hack. */
- if ((pr->cmd & PORT_CMD_FIS_ON) &&
- !s->dev[port].init_d2h_sent) {
- ahci_init_d2h(&s->dev[port]);
- }
+ /* XXX usually the FIS would be pending on the bus here and
+ issuing deferred until the OS enables FIS receival.
+ Instead, we only submit it once - which works in most
+ cases, but is a hack. */
+ if ((pr->cmd & PORT_CMD_FIS_ON) &&
+ !s->dev[port].init_d2h_sent) {
+ ahci_init_d2h(&s->dev[port]);
+ }
- check_cmd(s, port);
- break;
- case PORT_TFDATA:
- /* Read Only. */
- break;
- case PORT_SIG:
- /* Read Only */
- break;
- case PORT_SCR_STAT:
- /* Read Only */
- break;
- case PORT_SCR_CTL:
- if (((pr->scr_ctl & AHCI_SCR_SCTL_DET) == 1) &&
- ((val & AHCI_SCR_SCTL_DET) == 0)) {
- ahci_reset_port(s, port);
- }
- pr->scr_ctl = val;
- break;
- case PORT_SCR_ERR:
- pr->scr_err &= ~val;
- break;
- case PORT_SCR_ACT:
- /* RW1 */
- pr->scr_act |= val;
- break;
- case PORT_CMD_ISSUE:
- pr->cmd_issue |= val;
- check_cmd(s, port);
- break;
- default:
- break;
+ check_cmd(s, port);
+ break;
+ case PORT_TFDATA:
+ /* Read Only. */
+ break;
+ case PORT_SIG:
+ /* Read Only */
+ break;
+ case PORT_SCR_STAT:
+ /* Read Only */
+ break;
+ case PORT_SCR_CTL:
+ if (((pr->scr_ctl & AHCI_SCR_SCTL_DET) == 1) &&
+ ((val & AHCI_SCR_SCTL_DET) == 0)) {
+ ahci_reset_port(s, port);
+ }
+ pr->scr_ctl = val;
+ break;
+ case PORT_SCR_ERR:
+ pr->scr_err &= ~val;
+ break;
+ case PORT_SCR_ACT:
+ /* RW1 */
+ pr->scr_act |= val;
+ break;
+ case PORT_CMD_ISSUE:
+ pr->cmd_issue |= val;
+ check_cmd(s, port);
+ break;
+ default:
+ break;
}
}
--
2.14.3
- [Qemu-devel] [PULL 11/30] ahci: delete old port register address definitions, (continued)
- [Qemu-devel] [PULL 11/30] ahci: delete old port register address definitions, John Snow, 2018/06/08
- [Qemu-devel] [PULL 12/30] ahci: add host register enumeration, John Snow, 2018/06/08
- [Qemu-devel] [PULL 06/30] ahci: make port read traces more descriptive, John Snow, 2018/06/08
- [Qemu-devel] [PULL 09/30] ahci: modify ahci_port_write to use register numbers, John Snow, 2018/06/08
- [Qemu-devel] [PULL 17/30] ahci: adjust ahci_mem_write to work on registers, John Snow, 2018/06/08
- [Qemu-devel] [PULL 16/30] ahci: fix spacing damage on ahci_mem_write, John Snow, 2018/06/08
- [Qemu-devel] [PULL 26/30] ide: push end_transfer_func out of start_transfer callback, rename callback, John Snow, 2018/06/08
- [Qemu-devel] [PULL 27/30] ide: call ide_cmd_done from ide_transfer_stop, John Snow, 2018/06/08
- [Qemu-devel] [PULL 04/30] ahci: add port register enumeration, John Snow, 2018/06/08
- [Qemu-devel] [PULL 10/30] ahci: make port write traces more descriptive, John Snow, 2018/06/08
- [Qemu-devel] [PULL 07/30] ahci: fix spacing damage on ahci_port_write,
John Snow <=
- [Qemu-devel] [PULL 20/30] tests/boot-sector: Add magic bytes to s390x boot code header, John Snow, 2018/06/08
- [Qemu-devel] [PULL 23/30] MAINTAINERS: Add the cdrom-test to John's section, John Snow, 2018/06/08
- [Qemu-devel] [PULL 19/30] ahci: make ahci_mem_write traces more descriptive, John Snow, 2018/06/08
- [Qemu-devel] [PULL 28/30] ide: make ide_transfer_stop idempotent, John Snow, 2018/06/08
- [Qemu-devel] [PULL 22/30] tests/cdrom-test: Test that -cdrom parameter is working, John Snow, 2018/06/08
- [Qemu-devel] [PULL 21/30] tests/cdrom-test: Test booting from CD-ROM ISO image file, John Snow, 2018/06/08
- [Qemu-devel] [PULL 25/30] ahci: move PIO Setup FIS before transfer, fix it for ATAPI commands, John Snow, 2018/06/08
- [Qemu-devel] [PULL 30/30] ide: introduce ide_transfer_start_norecurse, John Snow, 2018/06/08
- [Qemu-devel] [PULL 29/30] atapi: call ide_set_irq before ide_transfer_start, John Snow, 2018/06/08
- [Qemu-devel] [PULL 24/30] libqos/ahci: track sector size, John Snow, 2018/06/08