Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 2015 08:48:56 +0000
From:      Hongjiang Zhang <honzhan@microsoft.com>
To:        "freebsd-scsi@FreeBSD.org" <freebsd-scsi@FreeBSD.org>
Subject:   Is there a method which can tell a SCSI device is valid or not
Message-ID:  <b71ed15b6acd45b3b4d097bbc4e7159c@SG2PR3002MB0106.064d.mgd.msft.net>

next in thread | raw e-mail | index | archive | help
I'd like to know whether there is a utility method which can tell a scsi de=
vice is perfectly installed or not. Is there a method like "is_scsi_install=
ed(struct scsi_inquiry_data *)"?

Background:
When I developed storage drivers for hyper-v on windows 10, I found in the =
windows host tells VM some of the devices status are ok, but in fact such d=
evice did not have valid information.
For example, "Fixed Uninstalled SPC-3 SCSI device (LUN not supported)" if I=
 print its inq_data.

The following code is used to print the inquire data:

struct scsi_inquiry_data *inq_data =3D &(ccb->ccb_h.path->device->inq_data)=
;
scsi_print_inquiry(inq_data);

The log I collected:

Dec 15 11:19:33 honzhan-dev2 kernel: <Msft Virtual Disk 1.0> Fixed Uninstal=
led SPC-3 SCSI device (LUN not supported)
Dec 15 11:19:33 honzhan-dev2 kernel: HV_DEBUG: VMBUS **SCSI_STATUS_OK with =
invalid SCSI
Dec 15 11:19:33 honzhan-dev2 kernel: HV_DEBUG: VMBUS 18: hv_storvsc_on_ioco=
mpletion type=3D0x1f, SPC-3 target=3D1, lun=3D0
Dec 15 11:19:33 honzhan-dev2 kernel: <Msft Virtual Disk 1.0> Fixed Uninstal=
led SPC-3 SCSI device (LUN not supported)
Dec 15 11:19:33 honzhan-dev2 kernel: HV_DEBUG: VMBUS **SCSI_STATUS_OK with =
invalid SCSI
Dec 15 11:19:33 honzhan-dev2 kernel: HV_DEBUG: VMBUS create_storvsc_request=
 probe:0 storvsc:1:0 0:0
Dec 15 11:19:33 honzhan-dev2 kernel: <Msft Virtual Disk 1.0> Fixed Uninstal=
led SPC-3 SCSI device (LUN not supported)
Dec 15 11:19:33 honzhan-dev2 kernel: HV_DEBUG: VMBUS XPT_SCSI_IO device->lu=
n_id=3Dffffffff
Dec 15 11:19:33 honzhan-dev2 kernel: HV_DEBUG: VMBUS create_storvsc_request=
 probe:1 storvsc:1:0 1:0
Dec 15 11:19:33 honzhan-dev2 kernel: <Msft Virtual Disk 1.0> Fixed Uninstal=
led SPC-3 SCSI device (LUN not supported)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b71ed15b6acd45b3b4d097bbc4e7159c>