Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/jdolecek-ncq]: src/sys/dev/ic Merge HEAD.
details: https://anonhg.NetBSD.org/src/rev/145f50019ab0
branches: jdolecek-ncq
changeset: 352655:145f50019ab0
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Apr 24 13:05:26 2017 +0000
description:
Merge HEAD.
diffstat:
sys/dev/ic/siisata.c | 97 ++++++++++++++++++++++++------------------------
sys/dev/ic/siisatareg.h | 6 ++-
2 files changed, 52 insertions(+), 51 deletions(-)
diffs (truncated from 320 to 300 lines):
diff -r 18ee41b716c1 -r 145f50019ab0 sys/dev/ic/siisata.c
--- a/sys/dev/ic/siisata.c Mon Apr 24 10:46:42 2017 +0000
+++ b/sys/dev/ic/siisata.c Mon Apr 24 13:05:26 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.30.4.11 2017/04/23 14:33:28 jakllsch Exp $ */
+/* $NetBSD: siisata.c,v 1.30.4.12 2017/04/24 13:09:37 jakllsch Exp $ */
/* from ahcisata_core.c */
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30.4.11 2017/04/23 14:33:28 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.30.4.12 2017/04/24 13:09:37 jakllsch Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -122,7 +122,8 @@
}
static inline void
-bus_space_read_region_stream_4(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, uint32_t *p, bus_size_t c)
+bus_space_read_region_stream_4(bus_space_tag_t t, bus_space_handle_t h,
+ bus_size_t o, uint32_t *p, bus_size_t c)
{
bus_space_read_region_4(t, h, o, p, c);
for (bus_size_t i = 0; i < c; i++) {
@@ -161,8 +162,8 @@
static void siisata_device_reset(struct ata_channel *);
static void siisata_activate_prb(struct siisata_channel *, int);
static void siisata_deactivate_prb(struct siisata_channel *, int);
-static int siisata_dma_setup(struct ata_channel *chp, int slot,
- void *data, size_t, int);
+static int siisata_dma_setup(struct ata_channel *chp, int, void *,
+ size_t, int);
#if NATAPIBUS > 0
void siisata_atapibus_attach(struct atabus_softc *);
@@ -171,7 +172,6 @@
void siisata_atapi_start(struct ata_channel *,struct ata_xfer *);
int siisata_atapi_complete(struct ata_channel *, struct ata_xfer *, int);
void siisata_atapi_kill_xfer(struct ata_channel *, struct ata_xfer *, int);
-void siisata_atapi_done(struct ata_channel *, struct ata_xfer *, int);
void siisata_atapi_scsipi_request(struct scsipi_channel *,
scsipi_adapter_req_t, void *);
void siisata_atapi_kill_pending(struct scsipi_periph *);
@@ -219,7 +219,7 @@
sc->sc_atac.atac_set_modes = siisata_setup_channel;
#if NATAPIBUS > 0
sc->sc_atac.atac_atapibus_attach = siisata_atapibus_attach;
-#endif
+#endif
/* come out of reset state */
GRWRITE(sc, GR_GC, 0);
@@ -228,9 +228,8 @@
siisata_attach_port(sc, i);
}
- SIISATA_DEBUG_PRINT(("%s: %s: GR_GC: 0x%08x\n",
- SIISATANAME(sc), __func__, GRREAD(sc, GR_GC)),
- DEBUG_FUNCS);
+ SIISATA_DEBUG_PRINT(("%s: %s: GR_GC: 0x%08x\n", SIISATANAME(sc),
+ __func__, GRREAD(sc, GR_GC)), DEBUG_FUNCS);
return;
}
@@ -448,7 +447,7 @@
for (i = 0; i < sc->sc_atac.atac_nchannels; i++) {
siisata_init_port(sc, i);
}
-
+
}
int
@@ -485,8 +484,8 @@
pis = PRREAD(sc, PRX(chp->ch_channel, PRO_PIS));
- SIISATA_DEBUG_PRINT(("%s: %s port %d, pis 0x%x ",
- SIISATANAME(sc), __func__, chp->ch_channel, pis), DEBUG_INTR);
+ SIISATA_DEBUG_PRINT(("%s: %s port %d, pis 0x%x ", SIISATANAME(sc),
+ __func__, chp->ch_channel, pis), DEBUG_INTR);
if (pis & PR_PIS_CMDCMPL) {
/* get slot status, clearing completion interrupt */
@@ -499,7 +498,7 @@
"completion on port %d\n",
SIISATANAME(sc), chp->ch_channel);
return;
- }
+ }
if ((~pss & __BIT(slot)) == 0) {
aprint_error( "%s: unknown slot "
"completion on port %d, pss 0x%x\n",
@@ -520,7 +519,7 @@
/* read in specific information about error */
prbfis = bus_space_read_stream_4(
sc->sc_prt, sc->sc_prh,
- PRSX(chp->ch_channel, slot, PRSO_FIS));
+ PRSX(chp->ch_channel, slot, PRSO_FIS));
/* set ch_status and ch_error */
satafis_rdh_parse(chp, (uint8_t *)&prbfis);
}
@@ -820,9 +819,8 @@
int i;
SIISATA_DEBUG_PRINT(("%s: %s port %d drive %d command 0x%x, slot %d\n",
- SIISATANAME((struct siisata_softc *)chp->ch_atac),
- __func__, chp->ch_channel, xfer->c_drive,
- ata_c->r_command, slot),
+ SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__,
+ chp->ch_channel, xfer->c_drive, ata_c->r_command, slot),
DEBUG_FUNCS|DEBUG_XFERS);
chp->ch_status = 0;
@@ -845,7 +843,7 @@
if (siisata_dma_setup(chp, slot,
(ata_c->flags & (AT_READ | AT_WRITE)) ? ata_c->data : NULL,
ata_c->bcount,
- (ata_c->flags & AT_READ) ? BUS_DMA_READ : BUS_DMA_WRITE)) {
+ (ata_c->flags & AT_READ) ? BUS_DMA_READ : BUS_DMA_WRITE)) {
ata_c->flags |= AT_DF;
siisata_cmd_complete(chp, xfer, 0);
return;
@@ -884,8 +882,9 @@
/* reenable interrupts */
siisata_enable_port_interrupt(chp);
out:
- SIISATA_DEBUG_PRINT(
- ("%s: %s: done\n", SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__), DEBUG_FUNCS);
+ SIISATA_DEBUG_PRINT(("%s: %s: done\n",
+ SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__),
+ DEBUG_FUNCS);
return;
}
@@ -919,8 +918,8 @@
#endif
int slot = SIISATA_NON_NCQ_SLOT;
- SIISATA_DEBUG_PRINT(
- ("%s: %s\n", SIISATANAME(sc), __func__), DEBUG_FUNCS|DEBUG_XFERS);
+ SIISATA_DEBUG_PRINT(("%s: %s\n", SIISATANAME(sc), __func__),
+ DEBUG_FUNCS|DEBUG_XFERS);
chp->ch_flags &= ~ATACH_IRQ_WAIT;
if (xfer->c_flags & C_TIMEOU)
@@ -954,9 +953,8 @@
uint16_t *idwordbuf;
int i;
- SIISATA_DEBUG_PRINT(
- ("%s: %s flags 0x%x error 0x%x\n", SIISATANAME(sc), __func__,
- ata_c->flags, ata_c->r_error), DEBUG_FUNCS|DEBUG_XFERS);
+ SIISATA_DEBUG_PRINT(("%s: %s flags 0x%x error 0x%x\n", SIISATANAME(sc),
+ __func__, ata_c->flags, ata_c->r_error), DEBUG_FUNCS|DEBUG_XFERS);
siisata_deactivate_prb(schp, slot);
@@ -1002,9 +1000,9 @@
struct ata_channel *chp = drvp->chnl_softc;
struct ata_bio *ata_bio = &xfer->c_bio;
- SIISATA_DEBUG_PRINT( ("%s: %s.\n",
- SIISATANAME((struct siisata_softc *)chp->ch_atac),
- __func__), DEBUG_FUNCS);
+ SIISATA_DEBUG_PRINT(("%s: %s.\n",
+ SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__),
+ DEBUG_FUNCS);
if (xfer == NULL)
return ATACMD_TRY_AGAIN;
@@ -1030,10 +1028,9 @@
int slot = SIISATA_NON_NCQ_SLOT;
int i;
- SIISATA_DEBUG_PRINT(
- ("%s: %s port %d, slot %d\n",
- SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__, chp->ch_channel, slot),
- DEBUG_FUNCS);
+ SIISATA_DEBUG_PRINT(("%s: %s port %d, slot %d\n",
+ SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__,
+ chp->ch_channel, slot), DEBUG_FUNCS);
chp->ch_status = 0;
chp->ch_error = 0;
@@ -1082,8 +1079,9 @@
siisata_enable_port_interrupt(chp);
out:
- SIISATA_DEBUG_PRINT(
- ("%s: %s: done\n", SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__), DEBUG_FUNCS);
+ SIISATA_DEBUG_PRINT(("%s: %s: done\n",
+ SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__),
+ DEBUG_FUNCS);
return;
}
@@ -1097,8 +1095,8 @@
int slot = SIISATA_NON_NCQ_SLOT;
SIISATA_DEBUG_PRINT(("%s: %s: port %d\n",
- SIISATANAME((struct siisata_softc *)chp->ch_atac),
- __func__, chp->ch_channel), DEBUG_FUNCS);
+ SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__,
+ chp->ch_channel), DEBUG_FUNCS);
siisata_deactivate_prb(schp, slot);
@@ -1157,8 +1155,8 @@
} else if (chp->ch_status & WDCS_CORR)
ata_bio->flags |= ATA_CORR;
- SIISATA_DEBUG_PRINT(("%s: %s bcount: %ld", SIISATANAME(sc),
- __func__, ata_bio->bcount), DEBUG_XFERS);
+ SIISATA_DEBUG_PRINT(("%s: %s bcount: %ld", SIISATANAME(sc), __func__,
+ ata_bio->bcount), DEBUG_XFERS);
if (ata_bio->error == NOERROR) {
if (ata_bio->flags & ATA_READ)
ata_bio->bcount -=
@@ -1166,7 +1164,7 @@
else
ata_bio->bcount = 0;
}
- SIISATA_DEBUG_PRINT((" now %ld\n", ata_bio->bcount), DEBUG_XFERS);
+ SIISATA_DEBUG_PRINT((" now %ld\n", ata_bio->bcount), DEBUG_XFERS);
if (ata_bio->flags & ATA_POLL)
return 1;
(*chp->ch_drive[drive].drv_done)(chp->ch_drive[drive].drv_softc, xfer);
@@ -1266,7 +1264,7 @@
siisata_deactivate_prb(struct siisata_channel *schp, int slot)
{
struct siisata_softc *sc;
-
+
sc = (struct siisata_softc *)schp->ata_channel.ch_atac;
KASSERTMSG((schp->sch_active_slots & __BIT(slot)) != 0,
@@ -1404,8 +1402,8 @@
/* if no ATAPI device detected at attach time, skip */
if (drvp->drive_type != ATA_DRIVET_ATAPI) {
- SIISATA_DEBUG_PRINT(("%s: drive %d "
- "not present\n", __func__, target), DEBUG_PROBE);
+ SIISATA_DEBUG_PRINT(("%s: drive %d not present\n", __func__,
+ target), DEBUG_PROBE);
return;
}
@@ -1461,7 +1459,7 @@
if ((id->atap_config & ATAPI_CFG_CMD_MASK)
== ATAPI_CFG_CMD_16) {
periph->periph_cap |= PERIPH_CAP_CMD16;
-
+
/* configure port for packet length */
PRWRITE(siic, PRX(chp->ch_channel, PRO_PCS),
PR_PC_PACKET_LENGTH);
@@ -1630,8 +1628,9 @@
/* reenable interrupts */
siisata_enable_port_interrupt(chp);
out:
- SIISATA_DEBUG_PRINT(
- ("%s: %s: done\n", SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__), DEBUG_FUNCS);
+ SIISATA_DEBUG_PRINT(("%s: %s: done\n",
+ SIISATANAME((struct siisata_softc *)chp->ch_atac), __func__),
+ DEBUG_FUNCS);
return;
}
@@ -1644,8 +1643,8 @@
struct scsipi_xfer *sc_xfer = xfer->c_scsipi;
int slot = SIISATA_NON_NCQ_SLOT;
- SIISATA_DEBUG_PRINT(
- ("%s: %s()\n", SIISATANAME(sc), __func__), DEBUG_INTR);
+ SIISATA_DEBUG_PRINT(("%s: %s()\n", SIISATANAME(sc), __func__),
+ DEBUG_INTR);
/* this comamnd is not active any more */
schp->sch_active_slots &= ~__BIT(slot);
@@ -1674,7 +1673,7 @@
sc_xfer->resid = sc_xfer->datalen;
sc_xfer->resid -= PRREAD(sc, PRSX(chp->ch_channel, slot, PRSO_RTC));
SIISATA_DEBUG_PRINT(("%s: %s datalen %d resid %d\n", SIISATANAME(sc),
- __func__, sc_xfer->datalen, sc_xfer->resid), DEBUG_XFERS);
+ __func__, sc_xfer->datalen, sc_xfer->resid), DEBUG_XFERS);
if ((chp->ch_status & WDCS_ERR) &&
((sc_xfer->xs_control & XS_CTL_REQSENSE) == 0 ||
sc_xfer->resid == sc_xfer->datalen)) {
diff -r 18ee41b716c1 -r 145f50019ab0 sys/dev/ic/siisatareg.h
--- a/sys/dev/ic/siisatareg.h Mon Apr 24 10:46:42 2017 +0000
+++ b/sys/dev/ic/siisatareg.h Mon Apr 24 13:05:26 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisatareg.h,v 1.7 2011/11/02 16:03:01 jakllsch Exp $ */
+/* $NetBSD: siisatareg.h,v 1.7.42.1 2017/04/24 13:05:26 jakllsch Exp $ */
Home |
Main Index |
Thread Index |
Old Index