Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Convert ahcisata(4) to C99 exact-width integer ty...



details:   https://anonhg.NetBSD.org/src/rev/db9f32fce0b8
branches:  trunk
changeset: 756517:db9f32fce0b8
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Tue Jul 20 18:50:48 2010 +0000

description:
Convert ahcisata(4) to C99 exact-width integer types.

diffstat:

 sys/dev/ic/ahcisata_core.c |  16 ++++++++--------
 sys/dev/ic/ahcisatareg.h   |  40 ++++++++++++++++++++--------------------
 sys/dev/ic/ahcisatavar.h   |   4 ++--
 3 files changed, 30 insertions(+), 30 deletions(-)

diffs (171 lines):

diff -r 2125f42869f1 -r db9f32fce0b8 sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c        Tue Jul 20 17:44:01 2010 +0000
+++ b/sys/dev/ic/ahcisata_core.c        Tue Jul 20 18:50:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisata_core.c,v 1.26 2010/04/07 17:51:16 jakllsch Exp $      */
+/*     $NetBSD: ahcisata_core.c,v 1.27 2010/07/20 18:50:48 jakllsch Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.26 2010/04/07 17:51:16 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.27 2010/07/20 18:50:48 jakllsch Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -142,7 +142,7 @@
 void
 ahci_setup_ports(struct ahci_softc *sc)
 {
-       u_int32_t ahci_ports;
+       uint32_t ahci_ports;
        int i, port;
        
        ahci_ports = AHCI_READ(sc, AHCI_PI);
@@ -161,7 +161,7 @@
 void
 ahci_reprobe_drives(struct ahci_softc *sc)
 {
-       u_int32_t ahci_ports;
+       uint32_t ahci_ports;
        int i, port;
        struct ahci_channel *achp;
        struct ata_channel *chp;
@@ -208,7 +208,7 @@
 void
 ahci_attach(struct ahci_softc *sc)
 {
-       u_int32_t ahci_cap, ahci_rev, ahci_ports;
+       uint32_t ahci_cap, ahci_rev, ahci_ports;
        int i, j, port;
        struct ahci_channel *achp;
        struct ata_channel *chp;
@@ -412,7 +412,7 @@
 ahci_intr(void *v)
 {
        struct ahci_softc *sc = v;
-       u_int32_t is;
+       uint32_t is;
        int i, r = 0;
 
        while ((is = AHCI_READ(sc, AHCI_IS))) {
@@ -430,7 +430,7 @@
 void
 ahci_intr_port(struct ahci_softc *sc, struct ahci_channel *achp)
 {
-       u_int32_t is, tfd;
+       uint32_t is, tfd;
        struct ata_channel *chp = &achp->ata_channel;
        struct ata_xfer *xfer = chp->ch_queue->active_xfer;
        int slot;
@@ -556,7 +556,7 @@
        struct ahci_softc *sc = (struct ahci_softc *)chp->ch_atac;
        struct ahci_channel *achp = (struct ahci_channel *)chp;
        int i, s;
-       u_int32_t sig;
+       uint32_t sig;
 
        /* XXX This should be done by other code. */
        for (i = 0; i < chp->ch_ndrive; i++) {
diff -r 2125f42869f1 -r db9f32fce0b8 sys/dev/ic/ahcisatareg.h
--- a/sys/dev/ic/ahcisatareg.h  Tue Jul 20 17:44:01 2010 +0000
+++ b/sys/dev/ic/ahcisatareg.h  Tue Jul 20 18:50:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisatareg.h,v 1.5 2009/10/19 18:41:12 bouyer Exp $   */
+/*     $NetBSD: ahcisatareg.h,v 1.6 2010/07/20 18:50:48 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -34,10 +34,10 @@
 /* in-memory structures used by the controller */
 /* physical region descriptor: points to a region of data (max 4MB) */
 struct ahci_dma_prd {
-       u_int32_t prd_dba; /* data base address (64 bits) */
-       u_int32_t prd_dbau;
-       u_int32_t prd_res; /* reserved */
-       u_int32_t prd_dbc; /* data byte count */
+       uint32_t prd_dba; /* data base address (64 bits) */
+       uint32_t prd_dbau;
+       uint32_t prd_res; /* reserved */
+       uint32_t prd_dbc; /* data byte count */
 #define AHCI_PRD_DBC_MASK 0x003fffff
 #define AHCI_PRD_DBC_IPC  0x80000000 /* interrupt on completion */
 } __packed;
@@ -46,9 +46,9 @@
 
 /* command table: describe a command to send to drive */
 struct ahci_cmd_tbl {
-       u_int8_t cmdt_cfis[64]; /* command FIS */
-       u_int8_t cmdt_acmd[16]; /* ATAPI command */
-       u_int8_t cmdt_res[48]; /* reserved */
+       uint8_t cmdt_cfis[64]; /* command FIS */
+       uint8_t cmdt_acmd[16]; /* ATAPI command */
+       uint8_t cmdt_res[48]; /* reserved */
        struct ahci_dma_prd cmdt_prd[1]; /* extended to AHCI_NPRD */
 } __packed;
 
@@ -63,7 +63,7 @@
  * of theses.
  */
 struct ahci_cmd_header {
-       u_int16_t cmdh_flags;
+       uint16_t cmdh_flags;
 #define AHCI_CMDH_F_PMP_MASK   0xf000 /* port multiplier port */
 #define AHCI_CMDH_F_PMP_SHIFT  12
 #define AHCI_CMDH_F_CBSY       0x0400 /* clear BSY on R_OK */
@@ -74,23 +74,23 @@
 #define AHCI_CMDH_F_A          0x0020 /* ATAPI */
 #define AHCI_CMDH_F_CFL_MASK   0x001f /* command FIS length (in dw) */
 #define AHCI_CMDH_F_CFL_SHIFT  0
-       u_int16_t cmdh_prdtl;   /* number of cmdt_prd */
-       u_int32_t cmdh_prdbc;   /* physical region descriptor byte count */
-       u_int32_t cmdh_cmdtba;  /* phys. addr. of cmd_tbl */
-       u_int32_t cmdh_cmdtbau; /* (64bits, 128bytes aligned) */
-       u_int32_t cmdh_res[4];  /* reserved */
+       uint16_t cmdh_prdtl;    /* number of cmdt_prd */
+       uint32_t cmdh_prdbc;    /* physical region descriptor byte count */
+       uint32_t cmdh_cmdtba;   /* phys. addr. of cmd_tbl */
+       uint32_t cmdh_cmdtbau;  /* (64bits, 128bytes aligned) */
+       uint32_t cmdh_res[4];   /* reserved */
 } __packed;
 
 #define AHCI_CMDH_SIZE (sizeof(struct ahci_cmd_header) * AHCI_MAX_CMDS)
 
 /* received FIS: where the HBA stores various type of FIS it receives */
 struct ahci_r_fis {
-       u_int8_t rfis_dsfis[32]; /* DMA setup FIS */
-       u_int8_t rfis_psfis[32]; /* PIO setup FIS */
-       u_int8_t rfis_rfis[24]; /* D2H register FIS */
-       u_int8_t rfis_sdbfis[8]; /* set device bit FIS */
-       u_int8_t rfis_ukfis[64]; /* unknown FIS */
-       u_int8_t rfis_res[96];
+       uint8_t rfis_dsfis[32]; /* DMA setup FIS */
+       uint8_t rfis_psfis[32]; /* PIO setup FIS */
+       uint8_t rfis_rfis[24];  /* D2H register FIS */
+       uint8_t rfis_sdbfis[8]; /* set device bit FIS */
+       uint8_t rfis_ukfis[64]; /* unknown FIS */
+       uint8_t rfis_res[96];   /* reserved */
 } __packed;
 
 #define AHCI_RFIS_SIZE (sizeof(struct ahci_r_fis))
diff -r 2125f42869f1 -r db9f32fce0b8 sys/dev/ic/ahcisatavar.h
--- a/sys/dev/ic/ahcisatavar.h  Tue Jul 20 17:44:01 2010 +0000
+++ b/sys/dev/ic/ahcisatavar.h  Tue Jul 20 18:50:48 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisatavar.h,v 1.5 2009/10/19 18:41:12 bouyer Exp $   */
+/*     $NetBSD: ahcisatavar.h,v 1.6 2010/07/20 18:50:48 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -69,7 +69,7 @@
                struct ahci_cmd_tbl *ahcic_cmd_tbl[AHCI_MAX_CMDS];
                bus_addr_t ahcic_bus_cmd_tbl[AHCI_MAX_CMDS];
                bus_dmamap_t ahcic_datad[AHCI_MAX_CMDS];
-               u_int32_t  ahcic_cmds_active; /* active commands */
+               uint32_t  ahcic_cmds_active; /* active commands */
        } sc_channels[AHCI_MAX_PORTS];
 };
 



Home | Main Index | Thread Index | Old Index