diff options
| author | 2006-11-28 23:59:45 +0000 | |
|---|---|---|
| committer | 2006-11-28 23:59:45 +0000 | |
| commit | 73d09fc56bd87109cdbe2d90369b3c6a93a5e94e (patch) | |
| tree | 489a1b920e2f327a4553184e9dddca9852de0863 /sys/dev/ic/gdt_common.c | |
| parent | I just don't know why I decided to set block count to 512 unconditionaly (diff) | |
| download | wireguard-openbsd-73d09fc56bd87109cdbe2d90369b3c6a93a5e94e.tar.xz wireguard-openbsd-73d09fc56bd87109cdbe2d90369b3c6a93a5e94e.zip | |
give scsi controllers a real attach args to fill in when attaching scsibus.
ok miod@ marco@ deraadt@
Diffstat (limited to 'sys/dev/ic/gdt_common.c')
| -rw-r--r-- | sys/dev/ic/gdt_common.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index 2db3a131f18..ed0b4b6f093 100644 --- a/sys/dev/ic/gdt_common.c +++ b/sys/dev/ic/gdt_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_common.c,v 1.36 2006/05/08 19:52:13 deraadt Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.37 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved. @@ -120,6 +120,7 @@ int gdt_attach(gdt) struct gdt_softc *gdt; { + struct scsibus_attach_args saa; u_int16_t cdev_cnt; int i, id, drv_cyls, drv_hds, drv_secs, error, nsegs; @@ -484,7 +485,10 @@ gdt_attach(gdt) #endif gdt_cnt++; - config_found(&gdt->sc_dev, &gdt->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &gdt->sc_link; + + config_found(&gdt->sc_dev, &saa, scsiprint); gdt->sc_raw_link = malloc(gdt->sc_bus_cnt * sizeof (struct scsi_link), M_DEVBUF, M_NOWAIT); @@ -502,7 +506,10 @@ gdt_attach(gdt) gdt->sc_raw_link[i].adapter_buswidth = (gdt->sc_class & GDT_FC) ? GDT_MAXID : 16; /* XXX */ - config_found(&gdt->sc_dev, &gdt->sc_raw_link[i], scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &gdt->sc_raw_link[i]; + + config_found(&gdt->sc_dev, &saa, scsiprint); } gdt_polling = 0; |
