diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-02-16 21:19:08 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-02-16 21:19:08 +0000 |
commit | 2da99529039b177155c4f8b121a56af665bbc013 (patch) | |
tree | 164ac14d81166b8b640ca50ae2bfbd661def8e85 /sys/dev/ata | |
parent | 02ba6ef4276aced0ecad6ed5dc9b0a7e1cd1d4ad (diff) |
Extend the scsi_adapter minphys() callback to take a struct scsi_link *
as additional argument. This will allow intermediate layers between
scsi devices such as sd and scsi host adapters to take appropriate
action if necessary.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/atascsi.c | 7 | ||||
-rw-r--r-- | sys/dev/ata/atascsi.h | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index ffa5ea551f5..b82242f0d53 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.63 2008/09/25 11:00:48 krw Exp $ */ +/* $OpenBSD: atascsi.c,v 1.64 2009/02/16 21:19:06 miod Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -56,7 +56,7 @@ void atascsi_free(struct scsi_link *); /* template */ struct scsi_adapter atascsi_switch = { atascsi_cmd, /* scsi_cmd */ - minphys, /* scsi_minphys */ + scsi_minphys, /* scsi_minphys */ atascsi_probe, /* dev_probe */ atascsi_free, /* dev_free */ atascsi_ioctl /* ioctl */ @@ -107,7 +107,8 @@ atascsi_attach(struct device *self, struct atascsi_attach_args *aaa) /* copy from template and modify for ourselves */ as->as_switch = atascsi_switch; - as->as_switch.scsi_minphys = aaa->aaa_minphys; + if (aaa->aaa_minphys != NULL) + as->as_switch.scsi_minphys = aaa->aaa_minphys; /* fill in our scsi_link */ as->as_link.device = &atascsi_device; diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h index 551e8c29060..c53d4c22c4e 100644 --- a/sys/dev/ata/atascsi.h +++ b/sys/dev/ata/atascsi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.h,v 1.32 2008/01/01 03:09:15 dlg Exp $ */ +/* $OpenBSD: atascsi.h,v 1.33 2009/02/16 21:19:06 miod Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -17,6 +17,7 @@ */ struct atascsi; +struct scsi_link; /* * ATA commands @@ -319,7 +320,8 @@ struct atascsi_attach_args { void *aaa_cookie; struct atascsi_methods *aaa_methods; - void (*aaa_minphys)(struct buf *); + void (*aaa_minphys)(struct buf *, + struct scsi_link *); int aaa_nports; int aaa_ncmds; int aaa_capability; |