From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
To: Ren@one-eyed-alien.net
Cc: Oliver Neukum <oliver@neukum.org>,
linux-usb-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org,
"Louis C. Kouvaris" <louisk@comcast.net>,
wilford smith <wilford_smith_2@hotmail.com>
Subject: Re: [linux-usb-devel] Re: [PATCH] Adaptec USBXchange and USB2Xchange support
Date: Mon, 30 Jan 2006 13:38:41 -0800 [thread overview]
Message-ID: <20060130213841.GA20739@one-eyed-alien.net> (raw)
In-Reply-To: <200601301904.15207.rene@exactcode.de>
[-- Attachment #1: Type: text/plain, Size: 2783 bytes --]
So how do you address a multi-LUN device with the USB2Xchange?
Matt
On Mon, Jan 30, 2006 at 07:04:15PM +0100, Ren? Rebe wrote:
> Hi,
>
> finally - I got multi target (that is a SCSI device other than ID = 0 and more than than one) working
> with the USB2Xchange. But it needs two ugly changes in transport.c:
>
> The first one is only encoding the ID, no LUN:
>
> --- ../linux-2.6.15/drivers/usb/storage/transport.c 2006-01-03 04:21:10.000000000 +0100
> +++ drivers/usb/storage/transport.c 2006-01-30 18:49:25.172317000 +0100
> @@ -983,7 +983,7 @@
> bcb->Tag = ++us->tag;
> bcb->Lun = srb->device->lun;
> if (us->flags & US_FL_SCM_MULT_TARG)
> - bcb->Lun |= srb->device->id << 4;
> + bcb->Lun = srb->device->id;
> bcb->Length = srb->cmd_len;
>
> /* copy the command payload */
>
> Would it be ok when special case that one only for the Adaptec device, for now?
> Or define a whole new 2nd MULTI_TARG(2) quirk?
>
> And furthermore the device does not respond to request other than the attached targets,
> this might be needed:
>
> @@ -1069,6 +1069,19 @@
> US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n",
> le32_to_cpu(bcs->Signature), bcs->Tag,
> residue, bcs->Status);
> +
> + if (bcs->Status > US_BULK_STAT_FAIL) {
> + /* Adaptec USB2XCHANGE */
> + if (us->pusb_dev->descriptor.idVendor == 0x03f3 &&
> + us->pusb_dev->descriptor.idProduct == 0x2003) {
> +
> + /* This device will send bcs->Status == 0x8a for unused targets and
> + == 0x02 for SRB's that require SENSE. */
> + bcs->Status = US_BULK_STAT_OK;
> + fake_sense = 1;
> + US_DEBUGP("Patched Bulk status to %d.\n", bcs->Status);
> + }
> + }
> if (bcs->Tag != us->tag || bcs->Status > US_BULK_STAT_PHASE) {
> US_DEBUGP("Bulk logical error\n");
> return USB_STOR_TRANSPORT_ERROR;
>
> Yours,
>
> --
> René Rebe - Rubensstr. 64 - 12157 Berlin (Europe / Germany)
> http://www.exactcode.de | http://www.t2-project.org
> +49 (0)30 255 897 45
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd_______________________________________________
> linux-usb-devel@lists.sourceforge.net
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver
NYET! The evil stops here!
-- Pitr
User Friendly, 6/22/1998
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-01-30 21:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-13 20:53 [PATCH] Adaptec USBXchange and USB2Xchange support René Rebe
2005-09-14 10:18 ` Andrew Morton
2006-01-30 13:22 ` René Rebe
2006-01-30 13:33 ` René Rebe
[not found] ` <200601301622.19998.oliver@neukum.org>
2006-01-30 15:36 ` [linux-usb-devel] " René Rebe
2006-01-30 18:04 ` René Rebe
2006-01-30 21:38 ` Matthew Dharm [this message]
2006-01-30 21:40 ` Matthew Dharm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060130213841.GA20739@one-eyed-alien.net \
--to=mdharm-kernel@one-eyed-alien.net \
--cc=Ren@one-eyed-alien.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=louisk@comcast.net \
--cc=oliver@neukum.org \
--cc=wilford_smith_2@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox