Bug 127927 - [isp] isp(4) target driver crashes kernel when set up dma for CTIO2
Summary: [isp] isp(4) target driver crashes kernel when set up dma for CTIO2
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-scsi (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-07 18:20 UTC by K Zhu
Modified: 2015-05-07 15:36 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description K Zhu 2008-10-07 18:20:01 UTC
crash happens when isp(4) target driver is responding to "SCSI inquiry (0x12)" from initiator.

the isp(4) target driver is assembling an CTIO2 IOCB which includes 
"FreeBSD Emulated Disk 0.1" and send to initiator.

Since it's a data transfer, it calls isp_pci_dmasetup() to set up DMA.
Inside this function, it calls --->bus_dmamap_load()<--- and crash happens inside it.

How-To-Repeat: follow link here: http://www.root.org/~nate/freebsd/scsi/README.targ

you need to have 2 PCs, each with one QLA23XX HBA on PCI slot.

One PC for initiator, another for target.

Also on target machine, when issue "./scsi_target -d bus:tgt:0 test_file",
use "camcontrol devlist -v" to find which bus your target isp is on. And always use 0 for tgt.
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2008-10-07 18:24:34 UTC
Responsible Changed
From-To: freebsd-i386->freebsd-scsi

Over to maintainer.
Comment 2 Sean Bruno freebsd_committer freebsd_triage 2013-04-29 07:36:48 UTC
Responsible Changed
From-To: freebsd-scsi->sbruno

Taking this for monitoring
Comment 3 Sean Bruno freebsd_committer freebsd_triage 2013-04-29 16:00:42 UTC
Responsible Changed
From-To: sbruno->mjacob

Reassign to maintainer as requested.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2014-03-29 21:14:27 UTC
Responsible Changed
From-To: mjacob->freebsd-scsi

mjacob's bit has been returned for safekeeping.
Comment 5 Sean Bruno freebsd_committer freebsd_triage 2015-05-07 15:36:34 UTC
The addition of ctl(4) to FreeBSD should supplant the use of targ(4) and should be preferred in this case.

Give that a try and see if it happens on newer freebsd releases.