28ef82eb7b
The isp(4) driver was changing the tag type for REQUEST SENSE commands to Head of Queue, when the CAM CCB flag CAM_TAG_ACTION_VALID was NOT set. CAM_TAG_ACTION_VALID is set when the tag action in the XPT_SCSI_IO is not CAM_TAG_ACTION_NONE and when the target has tagged queueing turned on. In most cases when CAM_TAG_ACTION_VALID is not set, it is because the target is not doing tagged queueing. In those cases, trying to send a Head of Queue tag may cause problems. Instead, default to sending a simple tag. IBM tape drives claim to support tagged queueing in their standard Inquiry data, but have the DQue bit set in the control mode page (mode page 10). CAM correctly detects that these drives do not support tagged queueing, and clears the CAM_TAG_ACTION_VALID flag on CCBs sent down to the drives. This caused the isp(4) driver to go down the path of setting the tag action to a default value, and for Request Sense commands only, set the tag action to Head of Queue. If an IBM tape drive does get a Head of Queue tag, it rejects it with Invalid Message Error (0x49,0x00). (The Qlogic firmware translates that to a Transport Error, which the driver translates to an Unrecoverable HBA Error, or CAM_UNREC_HBA_ERROR.) So, by default, it wasn't possible to get a good response from a REQUEST SENSE to an FC-attached IBM tape drive with the isp(4) driver. IBM tape drives (tested on an LTO-5 with G9N1 firmware and a TS1150 with 4470 firmware) also have a bug in that sending a command with a non-simple tag attribute breaks the tape drive's Command Reference Number (CRN) accounting and causes it to ignore all subsequent commands because it and the initiator disagree about the next expected CRN. The drives do reject the initial command with a head of queue tag with an Invalid Message Error (0x49,0x00), but after that they ignore any subsequent commands. IBM confirmed that it is a bug, and sent me test firmware that fixes the bug. However tape drives in the field will still exhibit the bug until they are upgraded. Request Sense is not often sent to targets because most errors are reported automatically through autosense in Fibre Channel and other modern transports. ("Modern" meaning post SCSI-2.) So this is not an error that would crop up frequently. But Request Sense is useful on tape devices to report status information, aside from error reporting. This problem is less serious without FC-Tape features turned on, specifically precise delivery of commands (which enables Command Reference Numbers), enabled on the target and initiator. Without FC-Tape features turned on, the target would return an error and things would continue on. And it also does not cause problems for targets that do tagged queueing, because in those cases the isp(4) driver just uses the tag type that is specified in the CCB, assuming the CAM_TAG_ACTION_VALID flag is set, and defaults to sending a Simple tag action if it isn't an ordered or head of queue tag. sys/dev/isp/isp.c: In isp_start(), don't try to send Request Sense commands with the Head of Queue tag attribute if the CCB doesn't have a valid tag action. The tag action likely isn't valid because the target doesn't support tagged queueing. Sponsored by: Spectra Logic MFC after: 3 days |
||
---|---|---|
.. | ||
aac | ||
aacraid | ||
acpi_support | ||
acpica | ||
adb | ||
adlink | ||
advansys | ||
ae | ||
age | ||
agp | ||
aha | ||
ahb | ||
ahci | ||
aic | ||
aic7xxx | ||
al_eth | ||
alc | ||
ale | ||
alpm | ||
altera | ||
amdpm | ||
amdsbwd | ||
amdsmb | ||
amdtemp | ||
amr | ||
an | ||
arcmsr | ||
asmc | ||
ata | ||
ath | ||
atkbdc | ||
auxio | ||
bce | ||
beri | ||
bfe | ||
bge | ||
bhnd | ||
bktr | ||
bm | ||
bnxt | ||
buslogic | ||
bvm | ||
bwi | ||
bwn | ||
bxe | ||
cadence | ||
cardbus | ||
cas | ||
ce | ||
cesa | ||
cfe | ||
cfi | ||
chromebook_platform | ||
ciss | ||
cm | ||
cmx | ||
coretemp | ||
cp | ||
cpuctl | ||
cpufreq | ||
cs | ||
ctau | ||
cx | ||
cxgb | ||
cxgbe | ||
cy | ||
cyapa | ||
dc | ||
dcons | ||
de | ||
digi | ||
dme | ||
dpaa | ||
dpms | ||
dpt | ||
drm | ||
drm2 | ||
dwc | ||
e1000 | ||
ed | ||
efidev | ||
eisa | ||
en | ||
ep | ||
esp | ||
et | ||
etherswitch | ||
evdev | ||
ex | ||
exca | ||
extres | ||
fatm | ||
fb | ||
fdc | ||
fdt | ||
fe | ||
ffec | ||
filemon | ||
firewire | ||
flash | ||
fxp | ||
gem | ||
glxiic | ||
glxsb | ||
gpio | ||
gxemul | ||
hatm | ||
hdmi | ||
hifn | ||
hme | ||
hpt27xx | ||
hptiop | ||
hptmv | ||
hptnr | ||
hptrr | ||
hwpmc | ||
hyperv | ||
ic | ||
ichiic | ||
ichsmb | ||
ichwd | ||
ida | ||
if_ndis | ||
iicbus | ||
iir | ||
intel | ||
intpm | ||
io | ||
ioat | ||
ipmi | ||
ips | ||
ipw | ||
isci | ||
iscsi | ||
iscsi_initiator | ||
iser | ||
isl | ||
ismt | ||
isp | ||
ispfw | ||
iwi | ||
iwm | ||
iwn | ||
ixgb | ||
ixgbe | ||
ixl | ||
jedec_ts | ||
jme | ||
joy | ||
kbd | ||
kbdmux | ||
ksyms | ||
le | ||
led | ||
lge | ||
lmc | ||
malo | ||
mbox | ||
mc146818 | ||
mca | ||
md | ||
mdio | ||
mem | ||
mfi | ||
mge | ||
mii | ||
mk48txx | ||
mlx | ||
mlx4 | ||
mlx5 | ||
mly | ||
mmc | ||
mn | ||
mpr | ||
mps | ||
mpt | ||
mrsas | ||
mse | ||
msk | ||
mvs | ||
mwl | ||
mxge | ||
my | ||
nand | ||
ncr | ||
nctgpio | ||
ncv | ||
netfpga10g/nf10bmac | ||
netmap | ||
nfe | ||
nfsmb | ||
nge | ||
nmdm | ||
nsp | ||
ntb | ||
null | ||
nvd | ||
nvme | ||
nvram | ||
nvram2env | ||
nxge | ||
oce | ||
ofw | ||
otus | ||
ow | ||
patm | ||
pbio | ||
pccard | ||
pccbb | ||
pcf | ||
pci | ||
pcn | ||
pdq | ||
pms | ||
powermac_nvram | ||
ppbus | ||
ppc | ||
proto | ||
psci | ||
pst | ||
pty | ||
puc | ||
qlxgb | ||
qlxgbe | ||
qlxge | ||
quicc | ||
ral | ||
random | ||
rc | ||
rccgpio | ||
re | ||
rl | ||
rndtest | ||
rp | ||
rt | ||
rtwn | ||
safe | ||
sbni | ||
scc | ||
sdhci | ||
sec | ||
sf | ||
sfxge | ||
sge | ||
siba | ||
siis | ||
sio | ||
sis | ||
sk | ||
smbus | ||
smc | ||
sn | ||
snp | ||
sound | ||
speaker | ||
spibus | ||
ste | ||
stg | ||
stge | ||
streams | ||
sym | ||
syscons | ||
tdfx | ||
terasic | ||
ti | ||
tl | ||
tpm | ||
trm | ||
tsec | ||
twa | ||
twe | ||
tws | ||
tx | ||
txp | ||
uart | ||
ubsec | ||
usb | ||
utopia | ||
vge | ||
viapm | ||
viawd | ||
videomode | ||
virtio | ||
vkbd | ||
vmware/vmxnet3 | ||
vnic | ||
vr | ||
vt | ||
vte | ||
vx | ||
vxge | ||
watchdog | ||
wb | ||
wbwd | ||
wi | ||
wpi | ||
wtap | ||
xdma | ||
xe | ||
xen | ||
xilinx | ||
xl |