Deleted Added
full compact
fdc.c (78058) fdc.c (78135)
1/*
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Don Ahn.
7 *
8 * Libretto PCMCIA floppy support by David Horwitt (dhorwitt@ucsd.edu)

--- 29 unchanged lines hidden (view full) ---

38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91
1/*
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Don Ahn.
7 *
8 * Libretto PCMCIA floppy support by David Horwitt (dhorwitt@ucsd.edu)

--- 29 unchanged lines hidden (view full) ---

38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
43 * SUCH DAMAGE.
44 *
45 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91
46 * $FreeBSD: head/sys/dev/fdc/fdc.c 78058 2001-06-11 10:48:10Z joerg $
46 * $FreeBSD: head/sys/dev/fdc/fdc.c 78135 2001-06-12 09:40:04Z peter $
47 *
48 */
49
50#include "opt_fdc.h"
51#include "card.h"
52
53#include <sys/param.h>
54#include <sys/systm.h>

--- 757 unchanged lines hidden (view full) ---

812 && disabled != 0)
813 device_disable(child);
814}
815
816static int
817fdc_attach(device_t dev)
818{
819 struct fdc_data *fdc;
47 *
48 */
49
50#include "opt_fdc.h"
51#include "card.h"
52
53#include <sys/param.h>
54#include <sys/systm.h>

--- 757 unchanged lines hidden (view full) ---

812 && disabled != 0)
813 device_disable(child);
814}
815
816static int
817fdc_attach(device_t dev)
818{
819 struct fdc_data *fdc;
820 int i, error;
821 const char *name;
820 int i, error, dunit;
821 const char *name, *dname;
822
823 fdc = device_get_softc(dev);
824 error = fdc_alloc_resources(fdc);
825 if (error) {
826 device_printf(dev, "cannot re-acquire resources\n");
827 return error;
828 }
829 error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq,

--- 21 unchanged lines hidden (view full) ---

851 fdout_wr(fdc, ((fdc->fdout = 0)));
852 bioq_init(&fdc->head);
853
854 /*
855 * Probe and attach any children. We should probably detect
856 * devices from the BIOS unless overridden.
857 */
858 name = device_get_nameunit(dev);
822
823 fdc = device_get_softc(dev);
824 error = fdc_alloc_resources(fdc);
825 if (error) {
826 device_printf(dev, "cannot re-acquire resources\n");
827 return error;
828 }
829 error = BUS_SETUP_INTR(device_get_parent(dev), dev, fdc->res_irq,

--- 21 unchanged lines hidden (view full) ---

851 fdout_wr(fdc, ((fdc->fdout = 0)));
852 bioq_init(&fdc->head);
853
854 /*
855 * Probe and attach any children. We should probably detect
856 * devices from the BIOS unless overridden.
857 */
858 name = device_get_nameunit(dev);
859 i = -1;
860 while ((i = resource_query_string(i, "at", name)) != -1)
861 fdc_add_child(dev, resource_query_name(i),
862 resource_query_unit(i));
859 i = 0;
860 while ((resource_find_match(&i, &dname, &dunit, "at", name)) == 0)
861 fdc_add_child(dev, dname, dunit);
863
864 return (bus_generic_attach(dev));
865}
866
867static int
868fdc_print_child(device_t me, device_t child)
869{
870 int retval = 0;

--- 1580 unchanged lines hidden ---
862
863 return (bus_generic_attach(dev));
864}
865
866static int
867fdc_print_child(device_t me, device_t child)
868{
869 int retval = 0;

--- 1580 unchanged lines hidden ---