Remove the cam-specific device wiring code. This was a duplicate of
the data in the resource tables, and cam is getting it directly now.
This commit is contained in:
parent
e238f1c84f
commit
430f14513d
@ -158,8 +158,6 @@ void options __P((void));
|
||||
void makefile __P((void));
|
||||
void headers __P((void));
|
||||
|
||||
|
||||
extern int seen_scbus;
|
||||
extern struct device *dtab;
|
||||
|
||||
extern char errbuf[80];
|
||||
|
@ -102,8 +102,6 @@ struct file_list *ftab;
|
||||
char errbuf[80];
|
||||
int maxusers;
|
||||
|
||||
int seen_scbus;
|
||||
|
||||
#define ns(s) strdup(s)
|
||||
|
||||
static int connect __P((char *, int));
|
||||
@ -340,15 +338,11 @@ Dev_spec:
|
||||
= {
|
||||
cur.d_name = $2;
|
||||
cur.d_unit = UNKNOWN;
|
||||
if (eq($2, "scbus"))
|
||||
seen_scbus = 1;
|
||||
} |
|
||||
Init_dev Dev NUMBER Dev_info
|
||||
= {
|
||||
cur.d_name = $2;
|
||||
cur.d_unit = $3;
|
||||
if (eq($2, "scbus"))
|
||||
seen_scbus = 1;
|
||||
};
|
||||
|
||||
Init_dev:
|
||||
|
@ -47,7 +47,6 @@ static const char rcsid[] =
|
||||
/*
|
||||
* build the ioconf.c file
|
||||
*/
|
||||
static void scbus_devtab __P((FILE *));
|
||||
|
||||
static char *
|
||||
devstr(struct device *dp)
|
||||
@ -184,10 +183,6 @@ newbus_ioconf()
|
||||
fprintf(fp, " */\n");
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "#include <sys/param.h>\n");
|
||||
|
||||
if (seen_scbus)
|
||||
scbus_devtab(fp);
|
||||
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "/*\n");
|
||||
fprintf(fp, " * New bus architecture devices.\n");
|
||||
@ -207,81 +202,3 @@ newbus_ioconf()
|
||||
(void) fclose(fp);
|
||||
moveifchanged(path("ioconf.c.new"), path("ioconf.c"));
|
||||
}
|
||||
|
||||
static char *
|
||||
id(int unit)
|
||||
{
|
||||
static char buf[32];
|
||||
|
||||
char *s;
|
||||
switch(unit)
|
||||
{
|
||||
case UNKNOWN:
|
||||
s ="CAMCONF_UNSPEC";
|
||||
break;;
|
||||
|
||||
case QUES:
|
||||
s ="CAMCONF_ANY";
|
||||
break;
|
||||
|
||||
default:
|
||||
(void) snprintf(buf, sizeof(buf), "%d", unit);
|
||||
s = buf;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/* XXX: dufault@hda.com: wiped out mkioconf.c locally:
|
||||
* All that nice "conflicting SCSI ID checking" is now
|
||||
* lost and should be put back in.
|
||||
*/
|
||||
static void
|
||||
scbus_devtab(fp)
|
||||
FILE *fp;
|
||||
{
|
||||
register struct device *dp;
|
||||
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "/*\n");
|
||||
fprintf(fp, " * CAM devices.\n");
|
||||
fprintf(fp, " */\n");
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "#include <cam/cam_conf.h>\n");
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "struct cam_sim_config cam_sinit[] = {\n");
|
||||
fprintf(fp, "/* pathid, sim name, sim unit, sim bus */\n");
|
||||
|
||||
for (dp = dtab; dp; dp = dp->d_next) {
|
||||
if (dp->d_type != DEVICE || dp->d_conn == 0 ||
|
||||
!eq(dp->d_name, "scbus"))
|
||||
continue;
|
||||
fprintf(fp, "{ %s, ", id(dp->d_unit));
|
||||
fprintf(fp, "\"%s\", ", dp->d_conn);
|
||||
fprintf(fp, "%s, ", id(dp->d_connunit));
|
||||
fprintf(fp, "%s },\n", id(dp->d_bus));
|
||||
}
|
||||
fprintf(fp, "{ 0, 0, 0, 0 }\n");
|
||||
fprintf(fp, "};\n");
|
||||
|
||||
|
||||
fprintf(fp, "\n");
|
||||
fprintf(fp, "struct cam_periph_config cam_pinit[] = {\n");
|
||||
fprintf(fp,
|
||||
"/* periph name, periph unit, pathid, target, LUN, flags */\n");
|
||||
for (dp = dtab; dp; dp = dp->d_next) {
|
||||
if (dp->d_type != DEVICE || dp->d_conn == 0 ||
|
||||
!eq(dp->d_conn, "scbus"))
|
||||
continue;
|
||||
|
||||
fprintf(fp, "{ ");
|
||||
fprintf(fp, "\"%s\", ", dp->d_name);
|
||||
fprintf(fp, "%s, ", id(dp->d_unit));
|
||||
fprintf(fp, "%s, ", id(dp->d_connunit));
|
||||
fprintf(fp, "%s, ", id(dp->d_target));
|
||||
fprintf(fp, "%s, ", id(dp->d_lun));
|
||||
fprintf(fp, " 0x%x },\n", dp->d_flags);
|
||||
}
|
||||
fprintf(fp, "{ 0, 0, 0, 0, 0, 0 }\n");
|
||||
fprintf(fp, "};\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user