diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-12-28 16:19:16 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-12-28 16:19:16 +0000 |
commit | 72cfb58a94217ff9e2a3702e5d361663d7c66a37 (patch) | |
tree | f8501c3b4aef719d977927138508ddb07640d7c8 /sys/dev/ata | |
parent | 2683a16fffbaaaef1dc9a8e971607aa7adcc165d (diff) |
massage the way vpds are defined. rename the page used for the devices
serial number and split the vpd header out for use in other places. while
here define the device identification page bits too.
ok krw@ marco@
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/atascsi.c | 16 | ||||
-rw-r--r-- | sys/dev/ata/atascsi.h | 3 |
2 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 45a4c5c089c..1fe99ac16ad 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.54 2007/12/09 01:30:59 dlg Exp $ */ +/* $OpenBSD: atascsi.c,v 1.55 2007/12/28 16:19:14 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -553,17 +553,17 @@ atascsi_disk_serial(struct scsi_xfer *xs) struct scsi_link *link = xs->sc_link; struct atascsi *as = link->adapter_softc; struct ata_port *ap = as->as_ports[link->target]; - struct scsi_inquiry_vpd vpd; + struct scsi_vpd_serial pg; - bzero(&vpd, sizeof(vpd)); + bzero(&pg, sizeof(pg)); - vpd.device = T_DIRECT; - vpd.page_code = SI_PG_SERIAL; - vpd.page_length = sizeof(ap->ap_identify.serial); - bcopy(ap->ap_identify.serial, vpd.serial, + pg.hdr.device = T_DIRECT; + pg.hdr.page_code = SI_PG_SERIAL; + pg.hdr.page_length = sizeof(ap->ap_identify.serial); + bcopy(ap->ap_identify.serial, pg.serial, sizeof(ap->ap_identify.serial)); - bcopy(&vpd, xs->data, MIN(sizeof(vpd), xs->datalen)); + bcopy(&pg, xs->data, MIN(sizeof(pg), xs->datalen)); return (atascsi_done(xs, XS_NOERROR)); } diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h index 58de6156786..39472937452 100644 --- a/sys/dev/ata/atascsi.h +++ b/sys/dev/ata/atascsi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.h,v 1.30 2007/12/06 12:19:01 jsg Exp $ */ +/* $OpenBSD: atascsi.h,v 1.31 2007/12/28 16:19:14 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -93,6 +93,7 @@ struct ata_identify { u_int16_t features85; /* 85 */ u_int16_t features86; /* 86 */ u_int16_t features87; /* 87 */ +#define ATA_ID_F87_WWN (1<<8) u_int16_t ultradma; /* 88 */ u_int16_t erasetime; /* 89 */ u_int16_t erasetimex; /* 90 */ |