Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Mar 2011 17:32:53 +1100
From:      Lawrence Stewart <lstewart@freebsd.org>
To:        Alexander Motin <mav@freebsd.org>
Cc:        Brandon Gooch <jamesbrandongooch@gmail.com>, freebsd-scsi@freebsd.org, FreeBSD-Current <freebsd-current@freebsd.org>, FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Re: Sense fetching [Was: cdrtools /devel ...]
Message-ID:  <4D92CE95.7040505@freebsd.org>
In-Reply-To: <4CDE5B8C.4000102@FreeBSD.org>
References:  <4CD45209.5010607@FreeBSD.org>	<AANLkTik5gBjUo3Qxs6rtgZMo8fnDFaSN-X3qEjRzB=QQ@mail.gmail.com> <4CDE5B8C.4000102@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/13/10 20:34, Alexander Motin wrote:
> Brandon Gooch wrote:
>> 2010/11/5 Alexander Motin <mav@freebsd.org>:
>>> Hi.
>>>
>>> I've reviewed tests that scgcheck does to SCSI subsystem. It shown
>>> combination of several issues in both CAM, ahci(4) and cdrtools itself.
>>> Several small patches allow us to pass most of that tests:
>>> http://people.freebsd.org/~mav/sense/
>>>
>>> ahci_resid.patch: Add support for reporting residual length on data
>>> underrun. SCSI commands often returns results shorter then expected.
>>> Returned value allows application to know/check how much data it really
>>> has. It is also important for sense fetching, as ATAPI and USB devices
>>> return sense as data in response to REQUEST_SENSE command.
>>>
>>> sense_resid.patch: When manually requesting sense data (ATAPI or USB),
>>> request only as much data as user requested (not the fixed structure
>>> size), and return respective sense residual length.
>>>
>>> pass_autosence.patch: Unless CAM_DIS_AUTOSENSE is set, always fetch
>>> sense if not done by SIM, independently of CAM_PASS_ERR_RECOVER. As soon
>>> as device freeze released before returning to user-level, user-level
>>> application by definition can't reliably fetch sense data if some other
>>> application (like hald) tries to access device same time.
>>>
>>> cdrtools.patch: Make libscg (part of cdrtools) on FreeBSD to submit
>>> wanted sense length to CAM and do not clear sense return buffer. It is
>>> mostly cosmetics, important probably only for scgcheck.
>>>
>>> Testers and reviewers welcome. I am especially interested in opinion
>>> about pass_autosence.patch -- may be we should lower sense fetching even
>>> deeper, to make it work for all cam_periph_runccb() consumers.
>>
>> Hey mav, sorry to chime in after so long here, but have some of these
>> patches been committed (as of r215179)?
>>
>> Which patches are still applicable for testing? I assume the cdrtools
>> patch for sure...
> 
> Now uncommitted pass_autosence.patch and possibly cdrtools.patch.
> 

To add another data point, I just applied the pass_autosence.patch to my
ahci enabled 8.2-STABLE r220153 kernel and I can now burn successfully
with cdrecord. The same kernel without the patch was unable to burn
(though it could erase disks ok).

Cheers,
Lawrence



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