Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to handle Test Unit Ready command

3 views
Skip to first unread message

Hongjiang Zhang via freebsd-scsi

unread,
Aug 15, 2016, 6:01:30 AM8/15/16
to freebs...@freebsd.org
Hi,

I'm developing the SCSI storage driver for FreeBSD on Hyper-V. When the host side hot removed a scsi disk from LUN 0, there will a TUR command issued from VM side. But what is the expected TUR response if the specified LUN is invalid?

Thanks
Hongjiang Zhang
_______________________________________________
freebs...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-scsi
To unsubscribe, send any mail to "freebsd-scsi...@freebsd.org"

Scott Long via freebsd-scsi

unread,
Aug 15, 2016, 1:59:00 PM8/15/16
to Hongjiang Zhang, freebs...@freebsd.org
The right way to do it in CAM is to respond with CAM_SEL_TIMEOUT. If you respond with something like CAM_DEV_NOT_THERE, I think it’ll trigger error recovery, retries, and ugly console messages. Probably should fix that if it hasn’t been done already.

Scott

Hongjiang Zhang via freebsd-scsi

unread,
Aug 16, 2016, 12:01:41 AM8/16/16
to Scott Long, freebs...@freebsd.org
Thanks Scott. It works for me.

You help resolve an issue which confused me for a long time. :-) Before that I have tried "CAM_DEV_NOT_THERE" for invalid LUN, but it blocks the scan for higher LUN than 7.

-----Original Message-----
From: Scott Long [mailto:scott...@yahoo.com]
Sent: Tuesday, August 16, 2016 1:57 AM
To: Hongjiang Zhang <hon...@microsoft.com>
Cc: freebs...@freebsd.org
Subject: Re: How to handle Test Unit Ready command

The right way to do it in CAM is to respond with CAM_SEL_TIMEOUT. If you respond with something like CAM_DEV_NOT_THERE, I think it’ll trigger error recovery, retries, and ugly console messages. Probably should fix that if it hasn’t been done already.

Scott

> On Aug 15, 2016, at 3:01 AM, Hongjiang Zhang via freebsd-scsi <freebs...@freebsd.org> wrote:
>
> Hi,
>
> I'm developing the SCSI storage driver for FreeBSD on Hyper-V. When the host side hot removed a scsi disk from LUN 0, there will a TUR command issued from VM side. But what is the expected TUR response if the specified LUN is invalid?
>
> Thanks
> Hongjiang Zhang
> _______________________________________________
> freebs...@freebsd.org mailing list
> https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2flists
> .freebsd.org%2fmailman%2flistinfo%2ffreebsd-scsi&data=01%7c01%7chonzha
> n%40microsoft.com%7c661ed35c02a841ca8ac208d3c5358819%7c72f988bf86f141a
> f91ab2d7cd011db47%7c1&sdata=MHFDmlweq0C3Q90VIb%2fcpzBktoMARKWRTbSqHTC2
> hNk%3d To unsubscribe, send any mail to
0 new messages