diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-02-19 11:48:35 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-02-19 11:48:35 +0000 |
commit | ba9fe1788e998566b683be13eaf4a19db27b32e6 (patch) | |
tree | 54e925869224ee491c98f862fd0868a5eb8c87bb | |
parent | a959e788b769c459811ae5a3a05c73d8e2fb2901 (diff) |
as is short for atascsi, not ab
-rw-r--r-- | sys/dev/ata/atascsi.c | 70 | ||||
-rw-r--r-- | sys/dev/ata/atascsi.h | 2 |
2 files changed, 36 insertions, 36 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 9ec35e2ff9d..670dce2ac54 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.1 2007/02/19 11:44:24 dlg Exp $ */ +/* $OpenBSD: atascsi.c,v 1.2 2007/02/19 11:48:34 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -31,15 +31,15 @@ #include <dev/ata/atascsi.h> struct atascsi { - struct device *ab_dev; - void *ab_cookie; + struct device *as_dev; + void *as_cookie; - int *ab_ports; + int *as_ports; - struct atascsi_methods *ab_methods; - struct scsi_adapter ab_switch; - struct scsi_link ab_link; - struct scsibus_softc *ab_scsibus; + struct atascsi_methods *as_methods; + struct scsi_adapter as_switch; + struct scsi_link as_link; + struct scsibus_softc *as_scsibus; }; int atascsi_probe(struct atascsi *, int); @@ -63,60 +63,60 @@ struct atascsi * atascsi_attach(struct device *self, struct atascsi_attach_args *aaa) { struct scsibus_attach_args saa; - struct atascsi *ab; + struct atascsi *as; int i; - ab = malloc(sizeof(struct atascsi), M_DEVBUF, M_WAITOK); - bzero(ab, sizeof(struct atascsi)); + as = malloc(sizeof(struct atascsi), M_DEVBUF, M_WAITOK); + bzero(as, sizeof(struct atascsi)); - ab->ab_dev = self; - ab->ab_cookie = aaa->aaa_cookie; - ab->ab_methods = aaa->aaa_methods; + as->as_dev = self; + as->as_cookie = aaa->aaa_cookie; + as->as_methods = aaa->aaa_methods; /* copy from template and modify for ourselves */ - ab->ab_switch = atascsi_switch; - ab->ab_switch.scsi_minphys = aaa->aaa_minphys; + as->as_switch = atascsi_switch; + as->as_switch.scsi_minphys = aaa->aaa_minphys; /* fill in our scsi_link */ - ab->ab_link.device = &atascsi_device; - ab->ab_link.adapter = &ab->ab_switch; - ab->ab_link.adapter_softc = ab; - ab->ab_link.adapter_buswidth = aaa->aaa_nports; - ab->ab_link.luns = 1; /* XXX port multiplier as luns */ - ab->ab_link.adapter_target = aaa->aaa_nports; - ab->ab_link.openings = aaa->aaa_ncmds; - - ab->ab_ports = malloc(sizeof(int) * aaa->aaa_nports, + as->as_link.device = &atascsi_device; + as->as_link.adapter = &as->as_switch; + as->as_link.adapter_softc = as; + as->as_link.adapter_buswidth = aaa->aaa_nports; + as->as_link.luns = 1; /* XXX port multiplier as luns */ + as->as_link.adapter_target = aaa->aaa_nports; + as->as_link.openings = aaa->aaa_ncmds; + + as->as_ports = malloc(sizeof(int) * aaa->aaa_nports, M_DEVBUF, M_WAITOK); - bzero(ab->ab_ports, sizeof(int) * aaa->aaa_nports); + bzero(as->as_ports, sizeof(int) * aaa->aaa_nports); /* fill in the port array with the type of devices there */ - for (i = 0; i < ab->ab_link.adapter_buswidth; i++) - atascsi_probe(ab, i); + for (i = 0; i < as->as_link.adapter_buswidth; i++) + atascsi_probe(as, i); bzero(&saa, sizeof(saa)); - saa.saa_sc_link = &ab->ab_link; + saa.saa_sc_link = &as->as_link; /* stash the scsibus so we can do hotplug on it */ - ab->ab_scsibus = (struct scsibus_softc *)config_found(self, &saa, + as->as_scsibus = (struct scsibus_softc *)config_found(self, &saa, scsiprint); - return (ab); + return (as); } int -atascsi_detach(struct atascsi *ab) +atascsi_detach(struct atascsi *as) { return (0); } int -atascsi_probe(struct atascsi *ab, int port) +atascsi_probe(struct atascsi *as, int port) { - if (port > ab->ab_link.adapter_buswidth) + if (port > as->as_link.adapter_buswidth) return (ENXIO); - ab->ab_ports[port] = ab->ab_methods->probe(ab->ab_cookie, port); + as->as_ports[port] = as->as_methods->probe(as->as_cookie, port); return (0); } diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h index 6f80cc4c547..04d8d0baa3b 100644 --- a/sys/dev/ata/atascsi.h +++ b/sys/dev/ata/atascsi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.h,v 1.1 2007/02/19 11:44:24 dlg Exp $ */ +/* $OpenBSD: atascsi.h,v 1.2 2007/02/19 11:48:34 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> |