svn commit: r208492 - in stable/8/sys/dev: ahci ata mvs siis
Alexander Motin
mav at FreeBSD.org
Mon May 24 11:01:57 UTC 2010
Author: mav
Date: Mon May 24 11:01:56 2010
New Revision: 208492
URL: http://svn.freebsd.org/changeset/base/208492
Log:
MFC r208410:
Report ATA/SATA channel number to NewBus at location string.
Modified:
stable/8/sys/dev/ahci/ahci.c
stable/8/sys/dev/ata/ata-pci.c
stable/8/sys/dev/ata/ata-pci.h
stable/8/sys/dev/mvs/mvs_pci.c
stable/8/sys/dev/mvs/mvs_soc.c
stable/8/sys/dev/siis/siis.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/geom/sched/ (props changed)
Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c Mon May 24 10:54:50 2010 (r208491)
+++ stable/8/sys/dev/ahci/ahci.c Mon May 24 11:01:56 2010 (r208492)
@@ -774,6 +774,16 @@ ahci_print_child(device_t dev, device_t
return (retval);
}
+static int
+ahci_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+
+ snprintf(buf, buflen, "channel=%d",
+ (int)(intptr_t)device_get_ivars(child));
+ return (0);
+}
+
devclass_t ahci_devclass;
static device_method_t ahci_methods[] = {
DEVMETHOD(device_probe, ahci_probe),
@@ -786,6 +796,7 @@ static device_method_t ahci_methods[] =
DEVMETHOD(bus_release_resource, ahci_release_resource),
DEVMETHOD(bus_setup_intr, ahci_setup_intr),
DEVMETHOD(bus_teardown_intr,ahci_teardown_intr),
+ DEVMETHOD(bus_child_location_str, ahci_child_location_str),
{ 0, 0 }
};
static driver_t ahci_driver = {
@@ -805,6 +816,7 @@ static device_method_t ahci_ata_methods[
DEVMETHOD(bus_release_resource, ahci_release_resource),
DEVMETHOD(bus_setup_intr, ahci_setup_intr),
DEVMETHOD(bus_teardown_intr,ahci_teardown_intr),
+ DEVMETHOD(bus_child_location_str, ahci_child_location_str),
{ 0, 0 }
};
static driver_t ahci_ata_driver = {
Modified: stable/8/sys/dev/ata/ata-pci.c
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.c Mon May 24 10:54:50 2010 (r208491)
+++ stable/8/sys/dev/ata/ata-pci.c Mon May 24 11:01:56 2010 (r208492)
@@ -544,6 +544,16 @@ ata_pci_dmafini(device_t dev)
ata_dmafini(dev);
}
+int
+ata_pci_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+
+ snprintf(buf, buflen, "channel=%d",
+ (int)(intptr_t)device_get_ivars(child));
+ return (0);
+}
+
static device_method_t ata_pci_methods[] = {
/* device interface */
DEVMETHOD(device_probe, ata_pci_probe),
@@ -564,6 +574,7 @@ static device_method_t ata_pci_methods[]
DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr),
DEVMETHOD(pci_read_config, ata_pci_read_config),
DEVMETHOD(pci_write_config, ata_pci_write_config),
+ DEVMETHOD(bus_child_location_str, ata_pci_child_location_str),
{ 0, 0 }
};
Modified: stable/8/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.h Mon May 24 10:54:50 2010 (r208491)
+++ stable/8/sys/dev/ata/ata-pci.h Mon May 24 11:01:56 2010 (r208492)
@@ -502,6 +502,8 @@ int ata_pci_write_ivar(device_t dev, dev
uint32_t ata_pci_read_config(device_t dev, device_t child, int reg, int width);
void ata_pci_write_config(device_t dev, device_t child, int reg,
uint32_t val, int width);
+int ata_pci_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen);
struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags);
int ata_pci_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r);
int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep);
@@ -550,6 +552,7 @@ static device_method_t __CONCAT(dname,_m
DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), \
DEVMETHOD(pci_read_config, ata_pci_read_config), \
DEVMETHOD(pci_write_config, ata_pci_write_config), \
+ DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), \
{ 0, 0 } \
}; \
static driver_t __CONCAT(dname,_driver) = { \
Modified: stable/8/sys/dev/mvs/mvs_pci.c
==============================================================================
--- stable/8/sys/dev/mvs/mvs_pci.c Mon May 24 10:54:50 2010 (r208491)
+++ stable/8/sys/dev/mvs/mvs_pci.c Mon May 24 11:01:56 2010 (r208492)
@@ -484,6 +484,16 @@ mvs_print_child(device_t dev, device_t c
return (retval);
}
+static int
+mvs_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+
+ snprintf(buf, buflen, "channel=%d",
+ (int)(intptr_t)device_get_ivars(child));
+ return (0);
+}
+
static device_method_t mvs_methods[] = {
DEVMETHOD(device_probe, mvs_probe),
DEVMETHOD(device_attach, mvs_attach),
@@ -495,6 +505,7 @@ static device_method_t mvs_methods[] = {
DEVMETHOD(bus_release_resource, mvs_release_resource),
DEVMETHOD(bus_setup_intr, mvs_setup_intr),
DEVMETHOD(bus_teardown_intr,mvs_teardown_intr),
+ DEVMETHOD(bus_child_location_str, mvs_child_location_str),
DEVMETHOD(mvs_edma, mvs_edma),
{ 0, 0 }
};
Modified: stable/8/sys/dev/mvs/mvs_soc.c
==============================================================================
--- stable/8/sys/dev/mvs/mvs_soc.c Mon May 24 10:54:50 2010 (r208491)
+++ stable/8/sys/dev/mvs/mvs_soc.c Mon May 24 11:01:56 2010 (r208492)
@@ -415,6 +415,16 @@ mvs_print_child(device_t dev, device_t c
return (retval);
}
+static int
+mvs_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+
+ snprintf(buf, buflen, "channel=%d",
+ (int)(intptr_t)device_get_ivars(child));
+ return (0);
+}
+
static device_method_t mvs_methods[] = {
DEVMETHOD(device_probe, mvs_probe),
DEVMETHOD(device_attach, mvs_attach),
@@ -427,6 +437,7 @@ static device_method_t mvs_methods[] = {
DEVMETHOD(bus_setup_intr, mvs_setup_intr),
DEVMETHOD(bus_teardown_intr,mvs_teardown_intr),
DEVMETHOD(mvs_edma, mvs_edma),
+ DEVMETHOD(bus_child_location_str, mvs_child_location_str),
{ 0, 0 }
};
static driver_t mvs_driver = {
Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c Mon May 24 10:54:50 2010 (r208491)
+++ stable/8/sys/dev/siis/siis.c Mon May 24 11:01:56 2010 (r208492)
@@ -400,6 +400,16 @@ siis_print_child(device_t dev, device_t
return (retval);
}
+static int
+siis_child_location_str(device_t dev, device_t child, char *buf,
+ size_t buflen)
+{
+
+ snprintf(buf, buflen, "channel=%d",
+ (int)(intptr_t)device_get_ivars(child));
+ return (0);
+}
+
devclass_t siis_devclass;
static device_method_t siis_methods[] = {
DEVMETHOD(device_probe, siis_probe),
@@ -412,6 +422,7 @@ static device_method_t siis_methods[] =
DEVMETHOD(bus_release_resource, siis_release_resource),
DEVMETHOD(bus_setup_intr, siis_setup_intr),
DEVMETHOD(bus_teardown_intr,siis_teardown_intr),
+ DEVMETHOD(bus_child_location_str, siis_child_location_str),
{ 0, 0 }
};
static driver_t siis_driver = {
More information about the svn-src-stable
mailing list