Bug 109521

Summary: [patch] chio(1): 'chio return' breaks on non-voltag changers
Product: Base System Reporter: joost
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.2-RELEASE   
Hardware: Any   
OS: Any   
Description Flags
file.diff none

Description joost 2007-02-25 09:50:05 UTC
Trying the `chio return` command on a changer without volume tags results
in a cry from the kernel:

(ch0:ahc0:0:4:1): READ ELEMENT STATUS. CDB: b8 30 0 1 0 1 0 0 4 0 0 0 
(ch0:ahc0:0:4:1): CAM Status: SCSI Status Error
(ch0:ahc0:0:4:1): SCSI Status: Check Condition
(ch0:ahc0:0:4:1): ILLEGAL REQUEST asc:24,0
(ch0:ahc0:0:4:1): Invalid field in CDB: Command byte 1 bit 4 is invalid
(ch0:ahc0:0:4:1): Unretryable error

byte 1 bit 4 == volume tags

This call originates from get_element_status() which is only called
from inside do_return(). The volume tag information appears to never
be used, so why ask for it?

On a changer without voltag support do:

chio move slot 0 drive 0
chio return drive 0

I haven't been able to test this with any other model than the one I

# camcontrol devlist
(HP C1557A U709)                   at scbus0 target 4 lun 0 (sa0,pass0)
(HP C1557A U709)                   at scbus0 target 4 lun 1 (ch0,pass1)
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:27 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped