login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
July
»
11
Re: REQUEST_SENSE and ide-cd.c
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Chuck Ebbert <cebbert@...>
To: Piotr Muszynski <piotr@...>
Cc: <linux-kernel@...>, USB development list <linux-usb-devel@...>, IDE/ATA development list <linux-ide@...>
Subject:
Re: REQUEST_SENSE and ide-cd.c
Date: Wednesday, July 11, 2007 - 6:09 pm
On 07/11/2007 04:30 AM, Piotr Muszynski wrote: [cc: linux-usb, linux-ide]
quoted text
> I am adding transparent ATAPI capability to USB gadget Mass Storage > driver. The idea is to pass USB traffic to block device queue as packet > requests. At the end of the queue, the requests are handled by ide-cd.c > driver. > > It breaks when the ide-cd.c driver unconditionally generates > REQUEST_SENSE for requests that ended in unit attention condition. > > By clearing the drive's unit attention condition, this additional > REQUEST_SENSE confuses the host, which fires it's own REQUEST_SENSE > packet, to which the drive replies with NO SENSE. > > I can see three solutions: > > 1. Intercept the sense data returned by ide-cd.c and emulate unit > attention condition in file_storage.c driver; > > 2. Introduce a new request flag causing ide-cd.c to skip calling > cdrom_queue_request_sense() for flagged requests, like below: > > cdrom_decode_status() 2.6.12: > - if (stat & ERR_STAT) { > + if (stat & ERR_STAT && !(rq->flags & REQ_NO_AUTOSENSE)) { > spin_lock_irqsave(&ide_lock, flags); > blkdev_dequeue_request(rq); > HWGROUP(drive)->rq = NULL; > spin_unlock_irqrestore(&ide_lock, flags); > cdrom_queue_request_sense(drive, rq->sense, rq); > } else > cdrom_end_request(drive, 0); > > 3. Acknowledge that ide-cd.c was not meant to work as in (2) and search > for another mechanism. Where? > > (1) would unnecessarily duplicate the drive's state. I'd rather do (3). > > So far, the (2) works well, but how bad is it? > I'd greatly appreciate any critical feedback.
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
REQUEST_SENSE and ide-cd.c
, Piotr Muszynski
, (Wed Jul 11, 4:30 am)
Re: REQUEST_SENSE and ide-cd.c
, Alan Cox
, (Fri Jul 13, 11:12 am)
Re: REQUEST_SENSE and ide-cd.c
, Chuck Ebbert
, (Wed Jul 11, 6:09 pm)
Re: [linux-usb-devel] REQUEST_SENSE and ide-cd.c
, Alan Stern
, (Thu Jul 12, 10:36 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
debian developer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Adrian Bunk
Re: LSM conversion to static interface
git
:
linux-netdev
:
Gerrit Renker
[PATCH 26/37] dccp: Integration of dynamic feature activation - part 1 (socket set...
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
Linus Torvalds
Re: [GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
5 users
and
1033 guests
online.
Online users
strcmp
nominalgeek
ionut
cyberbami
loseweightfarrf
Syndicate