[Midnightbsd-cvs] src [10068] trunk/sys/dev: sync up
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun May 27 19:10:56 EDT 2018
Revision: 10068
http://svnweb.midnightbsd.org/src/?rev=10068
Author: laffer1
Date: 2018-05-27 19:10:55 -0400 (Sun, 27 May 2018)
Log Message:
-----------
sync up
Modified Paths:
--------------
trunk/sys/dev/sge/if_sge.c
trunk/sys/dev/sge/if_sgereg.h
trunk/sys/dev/si/si.c
trunk/sys/dev/si/si.h
trunk/sys/dev/si/si2_z280.c
trunk/sys/dev/si/si3_t225.c
trunk/sys/dev/si/si_eisa.c
trunk/sys/dev/si/si_isa.c
trunk/sys/dev/si/si_pci.c
trunk/sys/dev/si/sireg.h
trunk/sys/dev/si/sivar.h
trunk/sys/dev/siba/siba.c
trunk/sys/dev/siba/siba_bwn.c
trunk/sys/dev/siba/siba_cc.c
trunk/sys/dev/siba/siba_core.c
trunk/sys/dev/siba/siba_ids.h
trunk/sys/dev/siba/siba_pcib.c
trunk/sys/dev/siba/siba_pcibvar.h
trunk/sys/dev/siba/sibareg.h
trunk/sys/dev/siba/sibavar.h
trunk/sys/dev/siis/siis.c
trunk/sys/dev/siis/siis.h
Modified: trunk/sys/dev/sge/if_sge.c
===================================================================
--- trunk/sys/dev/sge/if_sge.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/sge/if_sge.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2008-2010 Nikolay Denev <ndenev at gmail.com>
* Copyright (c) 2007-2008 Alexander Pohoyda <alexander.pohoyda at gmx.net>
@@ -34,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/sge/if_sge.c 243857 2012-12-04 09:32:43Z glebius $");
/*
* SiS 190/191 PCI Ethernet NIC driver.
Modified: trunk/sys/dev/sge/if_sgereg.h
===================================================================
--- trunk/sys/dev/sge/if_sgereg.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/sge/if_sgereg.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2008, 2009, 2010 Nikolay Denev <ndenev at gmail.com>
* Copyright (c) 2007, 2008 Alexander Pohoyda <alexander.pohoyda at gmx.net>
@@ -32,7 +33,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/sge/if_sgereg.h 264442 2014-04-14 04:51:59Z yongari $
*/
#ifndef _IF_SGEREG_H
@@ -284,7 +285,7 @@
#define SGE_RX_RING_CNT 256 /* [8, 1024] */
#define SGE_TX_RING_CNT 256 /* [8, 8192] */
#define SGE_DESC_ALIGN 16
-#define SGE_MAXTXSEGS 32
+#define SGE_MAXTXSEGS 35
#define SGE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header))
#define SGE_TSO_MAXSEGSIZE 4096
#define SGE_RX_BUF_ALIGN sizeof(uint64_t)
Modified: trunk/sys/dev/si/si.c
===================================================================
--- trunk/sys/dev/si/si.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/si.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Device driver for Specialix range (SI/XIO) of serial line multiplexors.
*
@@ -33,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/si/si.c 320923 2017-07-12 22:16:54Z jhb $");
#ifndef lint
static const char si_copyright1[] = "@(#) Copyright (C) Specialix International, 1990,1992,1998",
@@ -605,6 +606,8 @@
if (unit == 0)
make_dev(&si_Scdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
"si_control");
+ device_printf(dev,
+ "WARNING: This driver is deprecated and will be removed.\n");
return (0);
}
@@ -1446,7 +1449,6 @@
#if 0
/*
- * Note: called at splsoftclock from the timeout code
* This has to deal with two things... cause wakeups while waiting for
* tty drains on last process exit, and call l_start at about the right
* time for protocols like ppp.
Modified: trunk/sys/dev/si/si.h
===================================================================
--- trunk/sys/dev/si/si.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/si.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Device driver for Specialix range (SI/XIO) of serial line multiplexors.
* 'C' definitions for Specialix serial multiplex driver.
@@ -30,7 +31,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/si/si.h 179668 2008-06-09 08:43:27Z ed $
*/
#include <sys/callout.h>
Modified: trunk/sys/dev/si/si2_z280.c
===================================================================
--- trunk/sys/dev/si/si2_z280.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/si2_z280.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (C) 1988-1998 Specialix International.
*
@@ -28,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/si/si2_z280.c 154087 2006-01-06 20:17:48Z jhb $");
#include <sys/param.h>
#include <sys/bus.h>
Modified: trunk/sys/dev/si/si3_t225.c
===================================================================
--- trunk/sys/dev/si/si3_t225.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/si3_t225.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (C) 1996-2000 Specialix International.
*
@@ -28,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/si/si3_t225.c 154082 2006-01-06 19:58:08Z jhb $");
#include <sys/param.h>
#include <sys/bus.h>
Modified: trunk/sys/dev/si/si_eisa.c
===================================================================
--- trunk/sys/dev/si/si_eisa.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/si_eisa.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Device driver for Specialix range (SI/XIO) of serial line multiplexors.
*
@@ -20,7 +21,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/si/si_eisa.c 166923 2007-02-23 20:11:27Z piso $");
#include <sys/param.h>
#include <sys/systm.h>
Modified: trunk/sys/dev/si/si_isa.c
===================================================================
--- trunk/sys/dev/si/si_isa.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/si_isa.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Device driver for Specialix range (SI/XIO) of serial line multiplexors.
*
@@ -20,7 +21,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/si/si_isa.c 166914 2007-02-23 19:34:52Z imp $");
#include "opt_debug_si.h"
Modified: trunk/sys/dev/si/si_pci.c
===================================================================
--- trunk/sys/dev/si/si_pci.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/si_pci.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Device driver for Specialix range (SI/XIO) of serial line multiplexors.
*
@@ -19,7 +20,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/si/si_pci.c 174136 2007-12-01 20:39:47Z peter $");
#include <sys/param.h>
#include <sys/systm.h>
Modified: trunk/sys/dev/si/sireg.h
===================================================================
--- trunk/sys/dev/si/sireg.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/sireg.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Device driver for Specialix range (SI/XIO) of serial line multiplexors.
* 'C' definitions for Specialix serial multiplex driver.
@@ -30,7 +31,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/si/sireg.h 152172 2005-11-07 21:53:58Z jhb $
*/
/*
Modified: trunk/sys/dev/si/sivar.h
===================================================================
--- trunk/sys/dev/si/sivar.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/si/sivar.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Device driver for Specialix range (SI/XIO) of serial line multiplexors.
*
@@ -17,7 +18,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/si/sivar.h 139749 2005-01-06 01:43:34Z imp $
*/
#ifdef _KERNEL
Modified: trunk/sys/dev/siba/siba.c
===================================================================
--- trunk/sys/dev/siba/siba.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/siba.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2007 Bruce M. Simpson.
* All rights reserved.
@@ -25,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/siba/siba.c 227848 2011-11-22 21:55:40Z marius $");
#include <sys/param.h>
#include <sys/systm.h>
Modified: trunk/sys/dev/siba/siba_bwn.c
===================================================================
--- trunk/sys/dev/siba/siba_bwn.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/siba_bwn.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2009-2010 Weongyo Jeong <weongyo at freebsd.org>
* All rights reserved.
@@ -28,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/siba/siba_bwn.c 232472 2012-03-03 18:08:57Z jhb $");
/*
* Sonics Silicon Backplane front-end for bwn(4).
@@ -279,6 +280,14 @@
}
static int
+siba_bwn_find_cap(device_t dev, device_t child, int capability,
+ int *capreg)
+{
+
+ return (pci_find_cap(dev, capability, capreg));
+}
+
+static int
siba_bwn_find_extcap(device_t dev, device_t child, int capability,
int *capreg)
{
@@ -287,6 +296,14 @@
}
static int
+siba_bwn_find_htcap(device_t dev, device_t child, int capability,
+ int *capreg)
+{
+
+ return (pci_find_htcap(dev, capability, capreg));
+}
+
+static int
siba_bwn_alloc_msi(device_t dev, device_t child, int *count)
{
struct siba_bwn_softc *ssc;
@@ -405,7 +422,9 @@
DEVMETHOD(bus_teardown_intr, siba_bwn_teardown_intr),
/* PCI interface */
+ DEVMETHOD(pci_find_cap, siba_bwn_find_cap),
DEVMETHOD(pci_find_extcap, siba_bwn_find_extcap),
+ DEVMETHOD(pci_find_htcap, siba_bwn_find_htcap),
DEVMETHOD(pci_alloc_msi, siba_bwn_alloc_msi),
DEVMETHOD(pci_release_msi, siba_bwn_release_msi),
DEVMETHOD(pci_msi_count, siba_bwn_msi_count),
Modified: trunk/sys/dev/siba/siba_cc.c
===================================================================
--- trunk/sys/dev/siba/siba_cc.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/siba_cc.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2007 Bruce M. Simpson.
* All rights reserved.
@@ -43,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/siba/siba_cc.c 227848 2011-11-22 21:55:40Z marius $");
#include <sys/param.h>
#include <sys/systm.h>
Modified: trunk/sys/dev/siba/siba_core.c
===================================================================
--- trunk/sys/dev/siba/siba_core.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/siba_core.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2009-2010 Weongyo Jeong <weongyo at freebsd.org>
* All rights reserved.
@@ -28,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/siba/siba_core.c 266921 2014-05-31 11:08:22Z brueffer $");
/*
* the Sonics Silicon Backplane driver.
@@ -1739,12 +1740,10 @@
siba_pcicore_init(struct siba_pci *spc)
{
struct siba_dev_softc *sd = spc->spc_dev;
- struct siba_softc *siba;
if (sd == NULL)
return;
- siba = sd->sd_bus;
if (!siba_dev_isup_sub(sd))
siba_dev_up_sub(sd, 0);
Modified: trunk/sys/dev/siba/siba_ids.h
===================================================================
--- trunk/sys/dev/siba/siba_ids.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/siba_ids.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2007 Bruce M. Simpson.
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/siba/siba_ids.h 203319 2010-01-31 21:18:22Z weongyo $
*/
#ifndef _SIBA_SIBA_IDS_H_
Modified: trunk/sys/dev/siba/siba_pcib.c
===================================================================
--- trunk/sys/dev/siba/siba_pcib.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/siba_pcib.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2007 Bruce M. Simpson.
* All rights reserved.
@@ -29,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/siba/siba_pcib.c 227843 2011-11-22 21:28:20Z marius $");
#include <sys/param.h>
#include <sys/systm.h>
Modified: trunk/sys/dev/siba/siba_pcibvar.h
===================================================================
--- trunk/sys/dev/siba/siba_pcibvar.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/siba_pcibvar.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2007 Bruce M. Simpson.
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/siba/siba_pcibvar.h 183371 2008-09-26 03:57:23Z imp $
*/
#ifndef _SIBA_PCIBVAR_H_
Modified: trunk/sys/dev/siba/sibareg.h
===================================================================
--- trunk/sys/dev/siba/sibareg.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/sibareg.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2007 Bruce M. Simpson.
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/siba/sibareg.h 203944 2010-02-16 01:22:33Z weongyo $
*/
/*
Modified: trunk/sys/dev/siba/sibavar.h
===================================================================
--- trunk/sys/dev/siba/sibavar.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siba/sibavar.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2007 Bruce M. Simpson.
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/siba/sibavar.h 204922 2010-03-09 19:58:00Z weongyo $
*/
#ifndef _SIBA_SIBAVAR_H_
Modified: trunk/sys/dev/siis/siis.c
===================================================================
--- trunk/sys/dev/siis/siis.c 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siis/siis.c 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2009 Alexander Motin <mav at FreeBSD.org>
* All rights reserved.
@@ -25,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/siis/siis.c 315813 2017-03-23 06:41:13Z mav $");
#include <sys/param.h>
#include <sys/module.h>
@@ -129,7 +130,7 @@
snprintf(buf, sizeof(buf), "%s SATA controller",
siis_ids[i].name);
device_set_desc_copy(dev, buf);
- return (BUS_PROBE_VENDOR);
+ return (BUS_PROBE_DEFAULT);
}
}
return (ENXIO);
@@ -414,6 +415,13 @@
return (0);
}
+static bus_dma_tag_t
+siis_get_dma_tag(device_t bus, device_t child)
+{
+
+ return (bus_get_dma_tag(bus));
+}
+
devclass_t siis_devclass;
static device_method_t siis_methods[] = {
DEVMETHOD(device_probe, siis_probe),
@@ -427,6 +435,7 @@
DEVMETHOD(bus_setup_intr, siis_setup_intr),
DEVMETHOD(bus_teardown_intr,siis_teardown_intr),
DEVMETHOD(bus_child_location_str, siis_child_location_str),
+ DEVMETHOD(bus_get_dma_tag, siis_get_dma_tag),
{ 0, 0 }
};
static driver_t siis_driver = {
@@ -443,7 +452,7 @@
{
device_set_desc_copy(dev, "SIIS channel");
- return (0);
+ return (BUS_PROBE_DEFAULT);
}
static int
@@ -830,9 +839,7 @@
struct siis_channel *ch = device_get_softc(dev);
mtx_lock(&ch->mtx);
- xpt_batch_start(ch->sim);
siis_ch_intr(data);
- xpt_batch_done(ch->sim);
mtx_unlock(&ch->mtx);
}
@@ -996,19 +1003,9 @@
slot->dma.nsegs = 0;
/* If request moves data, setup and load SG list */
if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
- void *buf;
- bus_size_t size;
-
slot->state = SIIS_SLOT_LOADING;
- if (ccb->ccb_h.func_code == XPT_ATA_IO) {
- buf = ccb->ataio.data_ptr;
- size = ccb->ataio.dxfer_len;
- } else {
- buf = ccb->csio.data_ptr;
- size = ccb->csio.dxfer_len;
- }
- bus_dmamap_load(ch->dma.data_tag, slot->dma.data_map,
- buf, size, siis_dmasetprd, slot, 0);
+ bus_dmamap_load_ccb(ch->dma.data_tag, slot->dma.data_map,
+ ccb, siis_dmasetprd, slot, 0);
} else
siis_execute_transaction(slot);
}
@@ -1032,24 +1029,26 @@
return;
}
KASSERT(nsegs <= SIIS_SG_ENTRIES, ("too many DMA segment entries\n"));
- /* Get a piece of the workspace for this request */
- ctp = (struct siis_cmd *)
- (ch->dma.work + SIIS_CT_OFFSET + (SIIS_CT_SIZE * slot->slot));
- /* Fill S/G table */
- if (slot->ccb->ccb_h.func_code == XPT_ATA_IO)
- prd = &ctp->u.ata.prd[0];
- else
- prd = &ctp->u.atapi.prd[0];
- for (i = 0; i < nsegs; i++) {
- prd[i].dba = htole64(segs[i].ds_addr);
- prd[i].dbc = htole32(segs[i].ds_len);
- prd[i].control = 0;
+ slot->dma.nsegs = nsegs;
+ if (nsegs != 0) {
+ /* Get a piece of the workspace for this request */
+ ctp = (struct siis_cmd *)(ch->dma.work + SIIS_CT_OFFSET +
+ (SIIS_CT_SIZE * slot->slot));
+ /* Fill S/G table */
+ if (slot->ccb->ccb_h.func_code == XPT_ATA_IO)
+ prd = &ctp->u.ata.prd[0];
+ else
+ prd = &ctp->u.atapi.prd[0];
+ for (i = 0; i < nsegs; i++) {
+ prd[i].dba = htole64(segs[i].ds_addr);
+ prd[i].dbc = htole32(segs[i].ds_len);
+ prd[i].control = 0;
+ }
+ prd[nsegs - 1].control = htole32(SIIS_PRD_TRM);
+ bus_dmamap_sync(ch->dma.data_tag, slot->dma.data_map,
+ ((slot->ccb->ccb_h.flags & CAM_DIR_IN) ?
+ BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE));
}
- prd[nsegs - 1].control = htole32(SIIS_PRD_TRM);
- slot->dma.nsegs = nsegs;
- bus_dmamap_sync(ch->dma.data_tag, slot->dma.data_map,
- ((slot->ccb->ccb_h.flags & CAM_DIR_IN) ?
- BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE));
siis_execute_transaction(slot);
}
@@ -1121,8 +1120,8 @@
ATA_OUTL(ch->r_mem, SIIS_P_CACTL(slot->slot), prb_bus);
ATA_OUTL(ch->r_mem, SIIS_P_CACTH(slot->slot), prb_bus >> 32);
/* Start command execution timeout */
- callout_reset(&slot->timeout, (int)ccb->ccb_h.timeout * hz / 1000,
- (timeout_t*)siis_timeout, slot);
+ callout_reset_sbt(&slot->timeout, SBT_1MS * ccb->ccb_h.timeout, 0,
+ (timeout_t*)siis_timeout, slot, 0);
return;
}
@@ -1163,9 +1162,9 @@
continue;
if ((ch->toslots & (1 << i)) == 0)
continue;
- callout_reset(&slot->timeout,
- (int)slot->ccb->ccb_h.timeout * hz / 1000,
- (timeout_t*)siis_timeout, slot);
+ callout_reset_sbt(&slot->timeout,
+ SBT_1MS * slot->ccb->ccb_h.timeout, 0,
+ (timeout_t*)siis_timeout, slot, 0);
}
}
@@ -1947,7 +1946,7 @@
cpi->hba_inquiry = PI_SDTR_ABLE | PI_TAG_ABLE;
cpi->hba_inquiry |= PI_SATAPM;
cpi->target_sprt = 0;
- cpi->hba_misc = PIM_SEQSCAN;
+ cpi->hba_misc = PIM_SEQSCAN | PIM_UNMAPPED;
cpi->hba_eng_cnt = 0;
cpi->max_target = 15;
cpi->max_lun = 0;
@@ -1954,9 +1953,9 @@
cpi->initiator_id = 0;
cpi->bus_id = cam_sim_bus(sim);
cpi->base_transfer_speed = 150000;
- strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
- strncpy(cpi->hba_vid, "SIIS", HBA_IDLEN);
- strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
+ strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
+ strlcpy(cpi->hba_vid, "SIIS", HBA_IDLEN);
+ strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
cpi->unit_number = cam_sim_unit(sim);
cpi->transport = XPORT_SATA;
cpi->transport_version = XPORT_VERSION_UNSPECIFIED;
Modified: trunk/sys/dev/siis/siis.h
===================================================================
--- trunk/sys/dev/siis/siis.h 2018-05-27 23:10:35 UTC (rev 10067)
+++ trunk/sys/dev/siis/siis.h 2018-05-27 23:10:55 UTC (rev 10068)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2009 Alexander Motin <mav at FreeBSD.org>
* All rights reserved.
@@ -23,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/siis/siis.h 280276 2015-03-20 08:28:11Z mav $
*/
/* ATA register defines */
More information about the Midnightbsd-cvs
mailing list