From owner-freebsd-firewire Sun Oct 20 23:13:50 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C59137B401 for ; Sun, 20 Oct 2002 23:13:49 -0700 (PDT) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12EE843E42 for ; Sun, 20 Oct 2002 23:13:48 -0700 (PDT) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 50F8D2180DD for ; Mon, 21 Oct 2002 15:13:47 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id g9L6DlI13372; Mon, 21 Oct 2002 15:13:47 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (nat.keisu.t.u-tokyo.ac.jp [133.11.68.2]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHF51778; Mon, 21 Oct 2002 15:13:38 +0900 (JST) Date: Mon, 21 Oct 2002 15:13:38 +0900 Message-ID: From: Hidetoshi Shimokawa To: Julian Elischer Cc: Murray Stokely , Matthew Reimer , firewire@freebsd.org Subject: Re: MFC? In-Reply-To: References: <20021017230742.K27351@freebsdmall.com> User-Agent: Wanderlust/2.9.14 (Unchained Melody) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Fri, 18 Oct 2002 11:33:12 -0700 (PDT), Julian Elischer wrote: > > it has few hooks in other parts, and I am running it (not yet > successfully though) in 4.7. (with only one minor edit from -current). > > > On Thu, 17 Oct 2002, Murray Stokely wrote: > > > On Thu, Oct 17, 2002 at 11:00:56AM -0500, Matthew Reimer wrote: > > > Now that -stable is unfrozen, can the firewire driver be MFC'd? > > > > 5.0-RELEASE will be the next official version of FreeBSD -- it's not > > clear that this major new feature needs to be MFCed. I presume it > > hooks in with many different parts of the kernel and may be > > non-trivial to MFC. It hasn't been in -CURRENT very long yet anyway, > > and would need more testing time regardless. > > > > - Murray > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-firewire" in the body of the message > > The patch set is almost independ of the other part of the system. It doesn't affect stability of the system without loading the firewire modules. (The cam-related patch has already been in 4-branch for a half year.) Julian, what kind of problem do you have with 4.7? My (a month-old) 4.6-STABLE box works fine. Any objection to MFC? /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Sun Oct 20 23:40:12 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85DF437B404 for ; Sun, 20 Oct 2002 23:40:10 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A92743E7B for ; Sun, 20 Oct 2002 23:40:09 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021021064008.JKEZ26524.sccrmhc01.attbi.com@InterJet.elischer.org>; Mon, 21 Oct 2002 06:40:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA21682; Sun, 20 Oct 2002 23:20:50 -0700 (PDT) Date: Sun, 20 Oct 2002 23:20:49 -0700 (PDT) From: Julian Elischer To: Hidetoshi Shimokawa Cc: Murray Stokely , Matthew Reimer , firewire@freebsd.org Subject: Re: MFC? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 21 Oct 2002, Hidetoshi Shimokawa wrote: > At Fri, 18 Oct 2002 11:33:12 -0700 (PDT), > Julian Elischer wrote: > > > > it has few hooks in other parts, and I am running it (not yet > > successfully though) in 4.7. (with only one minor edit from -current). > > > > > > On Thu, 17 Oct 2002, Murray Stokely wrote: > > > > > On Thu, Oct 17, 2002 at 11:00:56AM -0500, Matthew Reimer wrote: > > > > Now that -stable is unfrozen, can the firewire driver be MFC'd? > > > > > > 5.0-RELEASE will be the next official version of FreeBSD -- it's not > > > clear that this major new feature needs to be MFCed. I presume it > > > hooks in with many different parts of the kernel and may be > > > non-trivial to MFC. It hasn't been in -CURRENT very long yet anyway, > > > and would need more testing time regardless. > > > > > > - Murray > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-firewire" in the body of the message > > > > > The patch set is almost independ of the other part of the system. > It doesn't affect stability of the system without loading the > firewire modules. > (The cam-related patch has already been in 4-branch for a half year.) > > Julian, what kind of problem do you have with 4.7? > My (a month-old) 4.6-STABLE box works fine. I think it's working ok, but it didn't seem to find the dvd recorder I have on a SBP2<->atapi converter.. I sent you a dmesg last week.. but I have not been able to do more work on it yet. > > Any objection to MFC? I think it should be MFC'd but firat you should but the userland parts into /usr.sbin or somewhere.. They shouldn't be in the kernel sources. you can ask cvs@freebsd.org to repo copy them to wherever they should be.. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Mon Oct 21 3: 9:23 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5085C37B401 for ; Mon, 21 Oct 2002 03:09:21 -0700 (PDT) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3D4E43E75 for ; Mon, 21 Oct 2002 03:09:19 -0700 (PDT) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 12D3A21809A for ; Mon, 21 Oct 2002 19:09:14 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id g9LA9DI00655; Mon, 21 Oct 2002 19:09:13 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (nat.keisu.t.u-tokyo.ac.jp [133.11.68.2]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHF55974; Mon, 21 Oct 2002 19:09:09 +0900 (JST) Date: Mon, 21 Oct 2002 19:09:09 +0900 Message-ID: From: Hidetoshi Shimokawa To: Julian Elischer Cc: Murray Stokely , Matthew Reimer , firewire@freebsd.org Subject: Re: MFC? In-Reply-To: <3D7FB359.7060704@vicor.com> References: User-Agent: Wanderlust/2.9.14 (Unchained Melody) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Sun, 20 Oct 2002 23:20:49 -0700 (PDT), Julian Elischer wrote: > > Julian, what kind of problem do you have with 4.7? > > My (a month-old) 4.6-STABLE box works fine. > > I think it's working ok, but it didn't seem to find the dvd recorder I > have on a SBP2<->atapi converter.. I sent you a dmesg last week.. but I > have not been able to do more work on it yet. I'm sorry I can't find your mail including dmesg. Could you sent me again? Or do you mean the following message? At Wed, 11 Sep 2002 14:19:21 -0700, Julian Elischer wrote: > > What kind of device do you use? DV or SBP-II? > > > It is a SBP-II to Atapi converter attached to a Pioneer DVR-A04 DVD writer. > > (the SBP-II->atapi adapter is from Indigita. a Dt418F, and the host adapter is > an Idigita OHCI iDT480PCI firewire PCI card.. > > found-> vendor=0x11c1, dev=0x5811, revid=0x04 > class=0c-00-10, hdrtype=0x00, mfdev=0 > subordinatebus=0 secondarybus=0 > intpin=a, irq=11 > map[10]: type 1, range 32, base e2000000, size 12 > > > I will start integrating the driver to my test machine today. (it is 4.7) > If it works here I will then back-port as needed to 4.4 for production. > I guess I need to first fiddle the PCI IDs in the driver to find this card. > > > > Any objection to MFC? > > I think it should be MFC'd but firat you should but the userland parts > into /usr.sbin or somewhere.. > They shouldn't be in the kernel sources. > you can ask cvs@freebsd.org to repo copy them to wherever they should > be.. Yes, bus_mgm.c and fw_tap.c shouldn't be there. I'll remove them. At least, we need a user land command to reset bus. I'm wondering what name of the command should be appropriate. fwcontrol? (a little confusing with firewall?) /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Oct 22 4:51:58 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A705237B404 for ; Tue, 22 Oct 2002 04:51:57 -0700 (PDT) Received: from SRDMAIL.SINP.MSU.RU (bigking.sinp.msu.ru [213.131.9.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8DB143E6A for ; Tue, 22 Oct 2002 04:51:52 -0700 (PDT) (envelope-from dima@sinp.msu.ru) Received: from [193.192.129.60] (helo=ns.artstyle.net) by SRDMAIL.SINP.MSU.RU with smtp (Exim 4.10) id 183xcb-000K07-00 for freebsd-firewire@freebsd.org; Tue, 22 Oct 2002 15:54:53 +0400 Received: (qmail 15671 invoked from network); 22 Oct 2002 11:52:30 -0000 Received: from admin.internal (10.6.1.1) by mail.artstyle.ru with SMTP; 22 Oct 2002 11:52:30 -0000 Date: Tue, 22 Oct 2002 15:54:03 +0400 (MSD) From: Dmitry Mottl X-X-Sender: dima@localhost To: freebsd-firewire@freebsd.org Subject: VAIO Firewire dock station with DVD-ROM Message-ID: <20021022154423.X217-100000@localhost> Organization: SINP MSU MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I have Sony VAIO laptop and I have successfuly installed firewire driver (/sys/dev/firewire/*) on it and i'm using DVD on DockStation without any problems except one -- i can't listen audio CD-ROMs. CD-ROM can be mount in usual way and all is going fine, if it has data (not audio) format. If i try to play audio with /usr/sbin/cdcontrol, following messages appear: Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000025270 Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 Request aborted Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 aa 00 0c 00, flags: 0x40, 6b cmd/28b data/32b sense Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): Invalid command operation code Thank you for your advice. ps. Please copy answer directly to me besides mailing list -- Dmitry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Oct 22 14:40:20 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 14C1137B401 for ; Tue, 22 Oct 2002 14:40:18 -0700 (PDT) Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0DCD43E42 for ; Tue, 22 Oct 2002 14:40:17 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021022214017.EKZM28719.rwcrmhc52.attbi.com@InterJet.elischer.org>; Tue, 22 Oct 2002 21:40:17 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA31585; Tue, 22 Oct 2002 14:23:25 -0700 (PDT) Date: Tue, 22 Oct 2002 14:23:23 -0700 (PDT) From: Julian Elischer To: Hidetoshi Shimokawa Cc: firewire@freebsd.org Subject: Firewire Question. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG When I disconnect my firewaire device from the adapter I get: Mounting root from ufs:/dev/ad0s1a ad0s1: type 0xa5, start 63, end = 40188959, size 40188897 : OK start_init: trying /sbin/init link_elf: symbol splash_register undefined Linux ELF exec handler installed firewire0: BUS reset firewire0: node_id = 0xc800ffc0, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) fw_set_bus_manager: 63->0 (loop=0) send phy_config root_node=-1 gap_count=1 start AT DMA status=12 bus_explore done firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: node_id = 0xc800ffc1, CYCLEMASTER mode firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me) fw_set_bus_manager: 63->1 (loop=0) send phy_config root_node=-1 gap_count=1 start AT DMA status=11 bus_explore done firewire0: BUS reset firewire0: node_id = 0xc800ffc0, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) fw_set_bus_manager: 63->0 (loop=0) send phy_config root_node=-1 gap_count=1 start AT DMA status=12 bus_explore done firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: BUS reset firewire0: node_id = 0x8800ffc0, non CYCLEMASTER mode firewire0: 2 nodes, maxhop <= 1, cable IRM = 0 (me) fw_set_bus_manager: 63->0 (loop=0) send phy_config root_node=-1 gap_count=1 start AT DMA status=11 bus_explore done However I see no information about the device.. how do I see if the device is responding? it is an SBP<->atapi adapter. but sbp doesn't seem to find it.. how can I find out what is wrong? Julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Oct 22 15:15: 3 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDBBA37B401 for ; Tue, 22 Oct 2002 15:15:00 -0700 (PDT) Received: from volatile.chemikals.org (cae57-176-131.sc.rr.com [66.57.176.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C5AC43E3B for ; Tue, 22 Oct 2002 15:14:51 -0700 (PDT) (envelope-from morganw@chemikals.org) Received: from localhost (morganw@localhost [127.0.0.1]) by volatile.chemikals.org (8.12.6/8.12.6) with ESMTP id g9MMEYRv058400; Tue, 22 Oct 2002 18:14:34 -0400 (EDT) (envelope-from morganw@chemikals.org) Date: Tue, 22 Oct 2002 18:14:34 -0400 (EDT) From: Wesley Morgan To: Julian Elischer Cc: firewire@FreeBSD.ORG Subject: Re: Firewire Question. In-Reply-To: Message-ID: <20021022181417.S58392-100000@volatile.chemikals.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is probably a stupid question but do you have the SBP module loaded along with the firewire? On Tue, 22 Oct 2002, Julian Elischer wrote: > > > When I disconnect my firewaire device from the adapter I get: > > > Mounting root from ufs:/dev/ad0s1a > ad0s1: type 0xa5, start 63, end = 40188959, size 40188897 : OK > start_init: trying /sbin/init > link_elf: symbol splash_register undefined > Linux ELF exec handler installed > firewire0: BUS reset > firewire0: node_id = 0xc800ffc0, CYCLEMASTER mode > firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) > fw_set_bus_manager: 63->0 (loop=0) > send phy_config root_node=-1 gap_count=1 > start AT DMA status=12 > bus_explore done > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: node_id = 0xc800ffc1, CYCLEMASTER mode > firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me) > fw_set_bus_manager: 63->1 (loop=0) > send phy_config root_node=-1 gap_count=1 > start AT DMA status=11 > bus_explore done > firewire0: BUS reset > firewire0: node_id = 0xc800ffc0, CYCLEMASTER mode > firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) > fw_set_bus_manager: 63->0 (loop=0) > send phy_config root_node=-1 gap_count=1 > start AT DMA status=12 > bus_explore done > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: node_id = 0x8800ffc0, non CYCLEMASTER mode > firewire0: 2 nodes, maxhop <= 1, cable IRM = 0 (me) > fw_set_bus_manager: 63->0 (loop=0) > send phy_config root_node=-1 gap_count=1 > start AT DMA status=11 > bus_explore done > > However I see no information about the device.. > > how do I see if the device is responding? > it is an SBP<->atapi adapter. > but sbp doesn't seem to find it.. > how can I find out what is wrong? > > > Julian > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-firewire" in the body of the message > -- Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Oct 22 16:40:11 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 305B237B404 for ; Tue, 22 Oct 2002 16:40:11 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 541A543E6E for ; Tue, 22 Oct 2002 16:40:10 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021022234009.KMBR26267.sccrmhc02.attbi.com@InterJet.elischer.org>; Tue, 22 Oct 2002 23:40:09 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA32186; Tue, 22 Oct 2002 16:39:27 -0700 (PDT) Date: Tue, 22 Oct 2002 16:39:27 -0700 (PDT) From: Julian Elischer To: Wesley Morgan Cc: firewire@FreeBSD.ORG Subject: Re: Firewire Question. In-Reply-To: <20021022181417.S58392-100000@volatile.chemikals.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Nope.. bad cable... Looks great now.. On Tue, 22 Oct 2002, Wesley Morgan wrote: > This is probably a stupid question but do you have the SBP module loaded > along with the firewire? > > On Tue, 22 Oct 2002, Julian Elischer wrote: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Oct 22 16:40:24 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 245A537B401 for ; Tue, 22 Oct 2002 16:40:22 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8621843E65 for ; Tue, 22 Oct 2002 16:40:21 -0700 (PDT) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org ([12.232.206.8]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20021022234020.KMGK26267.sccrmhc02.attbi.com@InterJet.elischer.org>; Tue, 22 Oct 2002 23:40:20 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA32180; Tue, 22 Oct 2002 16:36:48 -0700 (PDT) Date: Tue, 22 Oct 2002 16:36:46 -0700 (PDT) From: Julian Elischer To: Hidetoshi Shimokawa Cc: firewire@freebsd.org Subject: Re: Firewire Question. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Please ignore the previous mail.. I found a bad cable and now we can access the drive. cd0 at sbp0 bus 0 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 50.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present I can mount the device when it has a dvd in it. Julian On Tue, 22 Oct 2002, Julian Elischer wrote: > > > When I disconnect my firewaire device from the adapter I get: > > > Mounting root from ufs:/dev/ad0s1a > ad0s1: type 0xa5, start 63, end = 40188959, size 40188897 : OK > start_init: trying /sbin/init > link_elf: symbol splash_register undefined > Linux ELF exec handler installed > firewire0: BUS reset > firewire0: node_id = 0xc800ffc0, CYCLEMASTER mode > firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) > fw_set_bus_manager: 63->0 (loop=0) > send phy_config root_node=-1 gap_count=1 > start AT DMA status=12 > bus_explore done > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: node_id = 0xc800ffc1, CYCLEMASTER mode > firewire0: 2 nodes, maxhop <= 1, cable IRM = 1 (me) > fw_set_bus_manager: 63->1 (loop=0) > send phy_config root_node=-1 gap_count=1 > start AT DMA status=11 > bus_explore done > firewire0: BUS reset > firewire0: node_id = 0xc800ffc0, CYCLEMASTER mode > firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) > fw_set_bus_manager: 63->0 (loop=0) > send phy_config root_node=-1 gap_count=1 > start AT DMA status=12 > bus_explore done > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: BUS reset > firewire0: node_id = 0x8800ffc0, non CYCLEMASTER mode > firewire0: 2 nodes, maxhop <= 1, cable IRM = 0 (me) > fw_set_bus_manager: 63->0 (loop=0) > send phy_config root_node=-1 gap_count=1 > start AT DMA status=11 > bus_explore done > > However I see no information about the device.. > > how do I see if the device is responding? > it is an SBP<->atapi adapter. > but sbp doesn't seem to find it.. > how can I find out what is wrong? > > > Julian > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-firewire" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Oct 22 18:50:57 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5D1C37B401; Tue, 22 Oct 2002 18:50:55 -0700 (PDT) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C8B643E65; Tue, 22 Oct 2002 18:50:51 -0700 (PDT) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 7568B21809F; Wed, 23 Oct 2002 10:50:45 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id g9N1oju18065; Wed, 23 Oct 2002 10:50:45 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (nat.keisu.t.u-tokyo.ac.jp [133.11.68.2]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHF79455; Wed, 23 Oct 2002 10:50:44 +0900 (JST) Date: Wed, 23 Oct 2002 10:50:44 +0900 Message-ID: From: Hidetoshi Shimokawa To: Dmitry Mottl Cc: freebsd-firewire@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: VAIO Firewire dock station with DVD-ROM In-Reply-To: <20021022154423.X217-100000@localhost> References: <20021022154423.X217-100000@localhost> User-Agent: Wanderlust/2.9.14 (Unchained Melody) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Tue, 22 Oct 2002 15:54:03 +0400 (MSD), Dmitry Mottl wrote: > > Hello, > > I have Sony VAIO laptop and I have successfuly installed firewire driver (/sys/dev/firewire/*) on it and i'm > using DVD on DockStation without any problems except one -- i can't listen audio CD-ROMs. > CD-ROM can be mount in usual way and all is going fine, if it has data (not audio) format. > > If i try to play audio with /usr/sbin/cdcontrol, following messages appear: > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000025270 > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 Request aborted > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 aa 00 0c 00, flags: 0x40, 6b cmd/28b data/32b sense > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): Invalid command operation code > > Thank you for your advice. This seems another 6bytes and 10bytes command problem. /sys/cam/scsi/scsi_cd.c issues "MODE SENSE(6)" though the DVD drive doesn't support it. We need some workaround to use "MODE SENSE(10)". /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Oct 22 22:31:50 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FA8737B401; Tue, 22 Oct 2002 22:31:49 -0700 (PDT) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A82543E4A; Tue, 22 Oct 2002 22:31:48 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.5/8.12.5) with ESMTP id g9N5VgKD042624; Tue, 22 Oct 2002 23:31:42 -0600 (MDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id g9N5Ve4V042623; Tue, 22 Oct 2002 23:31:40 -0600 (MDT) (envelope-from ken) Date: Tue, 22 Oct 2002 23:31:40 -0600 From: "Kenneth D. Merry" To: Hidetoshi Shimokawa Cc: Dmitry Mottl , freebsd-firewire@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Subject: Re: VAIO Firewire dock station with DVD-ROM Message-ID: <20021022233140.A42587@panzer.kdm.org> References: <20021022154423.X217-100000@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from simokawa@sat.t.u-tokyo.ac.jp on Wed, Oct 23, 2002 at 10:50:44AM +0900 Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Oct 23, 2002 at 10:50:44 +0900, Hidetoshi Shimokawa wrote: > At Tue, 22 Oct 2002 15:54:03 +0400 (MSD), > Dmitry Mottl wrote: > > > > Hello, > > > > I have Sony VAIO laptop and I have successfuly installed firewire driver (/sys/dev/firewire/*) on it and i'm > > using DVD on DockStation without any problems except one -- i can't listen audio CD-ROMs. > > CD-ROM can be mount in usual way and all is going fine, if it has data (not audio) format. > > > > If i try to play audio with /usr/sbin/cdcontrol, following messages appear: > > > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000025270 > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 Request aborted > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 aa 00 0c 00, flags: 0x40, 6b cmd/28b data/32b sense > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): Invalid command operation code > > > > Thank you for your advice. > > This seems another 6bytes and 10bytes command problem. > /sys/cam/scsi/scsi_cd.c issues "MODE SENSE(6)" though the DVD drive > doesn't support it. > We need some workaround to use "MODE SENSE(10)". I've got some patches that address this in the cd(4) driver, although they aren't quite ready to test. The right way to fix this is to have 6/10 byte capability defined as part of the protocol information. (This would be part of the CAM_NEW_TRAN_CODE stuff.) Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Thu Oct 24 1: 7:31 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B85037B404 for ; Thu, 24 Oct 2002 01:07:27 -0700 (PDT) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30A0543E65 for ; Thu, 24 Oct 2002 01:07:26 -0700 (PDT) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 22F7421809B for ; Thu, 24 Oct 2002 17:07:20 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id g9O87Ju19716; Thu, 24 Oct 2002 17:07:19 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (nat.keisu.t.u-tokyo.ac.jp [133.11.68.2]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHG00717; Thu, 24 Oct 2002 17:07:18 +0900 (JST) Date: Thu, 24 Oct 2002 17:07:18 +0900 Message-ID: From: Hidetoshi Shimokawa To: Dmitry Mottl Cc: freebsd-firewire@freebsd.org Newsgroups: freebsd.firewire,freebsd.scsi Subject: Re: VAIO Firewire dock station with DVD-ROM In-Reply-To: References: <20021022154423.X217-100000@localhost> User-Agent: Wanderlust/2.9.14 (Unchained Melody) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Wed, 23 Oct 2002 10:50:44 +0900, simokawa wrote: > > At Tue, 22 Oct 2002 15:54:03 +0400 (MSD), > Dmitry Mottl wrote: > > > > Hello, > > > > I have Sony VAIO laptop and I have successfuly installed firewire driver (/sys/dev/firewire/*) on it and i'm > > using DVD on DockStation without any problems except one -- i can't listen audio CD-ROMs. > > CD-ROM can be mount in usual way and all is going fine, if it has data (not audio) format. > > > > If i try to play audio with /usr/sbin/cdcontrol, following messages appear: > > > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000025270 > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 Request aborted > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 aa 00 0c 00, flags: 0x40, 6b cmd/28b data/32b sense > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): Invalid command operation code > > > > Thank you for your advice. > > This seems another 6bytes and 10bytes command problem. > /sys/cam/scsi/scsi_cd.c issues "MODE SENSE(6)" though the DVD drive > doesn't support it. > We need some workaround to use "MODE SENSE(10)". Could you try this patch? Index: sbp.c =================================================================== RCS file: /home/firewire/src/sys/dev/firewire/sbp.c,v retrieving revision 1.173 diff -u -r1.173 sbp.c --- sbp.c 23 Oct 2002 13:07:05 -0000 1.173 +++ sbp.c 24 Oct 2002 08:04:28 -0000 @@ -299,6 +299,10 @@ static void sbp_detach_target __P((struct sbp_target *)); static void sbp_timeout __P((void *arg)); static void sbp_mgm_orb __P((struct sbp_dev *, int)); +#define FIX_6BYTES_CMD 1 +#if FIX_6BYTES_CMD +static int sbp_scsi_6_to_10 __P((unsigned char *, unsigned char *, int)); +#endif MALLOC_DEFINE(M_SBP, "sbp", "SBP-II/Firewire"); @@ -1754,6 +1758,7 @@ { struct ccb_scsiio *csio; struct sbp_ocb *ocb; + void *cdb; int s, speed; csio = &ccb->csio; @@ -1823,15 +1828,19 @@ if (csio->ccb_h.flags & CAM_DATA_PHYS) printf("sbp: CAM_DATA_PHYS\n"); - if (csio->ccb_h.flags & CAM_CDB_POINTER) { - bcopy(csio->cdb_io.cdb_ptr, - (void *)(uintptr_t)(volatile void *)&ocb->orb[5], - (csio->cdb_len + 3) & ~0x3); - } else { - bcopy(&csio->cdb_io.cdb_bytes, + if (csio->ccb_h.flags & CAM_CDB_POINTER) + cdb = (void *)csio->cdb_io.cdb_ptr; + else + cdb = (void *)&csio->cdb_io.cdb_bytes; +#if FIX_6BYTES_CMD + sbp_scsi_6_to_10((char *)cdb, + (char *)(uintptr_t)(volatile void *)&ocb->orb[5], + (csio->cdb_len + 3) &~0x3); +#else + bcopy(cdb, (void *)(uintptr_t)(volatile void *)&ocb->orb[5], (csio->cdb_len + 3) &~0x3); - } +#endif /* printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[0]), ntohl(ocb->orb[1]), ntohl(ocb->orb[2]), ntohl(ocb->orb[3])); printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), ntohl(ocb->orb[6]), ntohl(ocb->orb[7])); @@ -2190,6 +2199,50 @@ splx(s); } + +#if FIX_6BYTES_CMD +/* + * This is based on umass_scsi_6_to_10() in umass.c. + */ + +static int +sbp_scsi_6_to_10(unsigned char *cmd, unsigned char *rcmd, int size) +{ + switch (cmd[0]) { + case READ_6: + rcmd[0] = READ_10; + break; + case WRITE_6: + rcmd[0] = WRITE_10; + break; + case MODE_SENSE_6: + rcmd[0] = MODE_SENSE_10; + break; + case MODE_SELECT_6: + rcmd[0] = MODE_SELECT_10; + break; + default: + bcopy(cmd, rcmd, size); + return (0); + } + + bzero(rcmd + 1, 10 - 1); + switch (cmd[0]) { + case READ_6: + case WRITE_6: + memcpy(&rcmd[3], &cmd[1], 3); + break; + case MODE_SENSE_6: + rcmd[2] = cmd[2]; + case MODE_SELECT_6: + rcmd[1] = cmd[1]; + break; + } + rcmd[8] = cmd[4]; + rcmd[9] = cmd[5]; + return (1); +} +#endif static devclass_t sbp_devclass; /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Fri Oct 25 3: 0:53 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90AA337B404 for ; Fri, 25 Oct 2002 03:00:50 -0700 (PDT) Received: from SRDMAIL.SINP.MSU.RU (bigking.sinp.msu.ru [213.131.9.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id A52CB43E7B for ; Fri, 25 Oct 2002 03:00:48 -0700 (PDT) (envelope-from dima@sinp.msu.ru) Received: from work.artstyle.ru ([193.192.129.60] helo=ns.artstyle.net) by SRDMAIL.SINP.MSU.RU with smtp (Exim 4.10) id 1851Ja-0004uP-00 for freebsd-firewire@freebsd.org; Fri, 25 Oct 2002 14:03:39 +0400 Received: (qmail 10174 invoked from network); 25 Oct 2002 10:01:28 -0000 Received: from admin.internal (10.6.1.1) by mail.artstyle.ru with SMTP; 25 Oct 2002 10:01:28 -0000 Date: Fri, 25 Oct 2002 14:03:12 +0400 (MSD) From: Dmitry Mottl X-X-Sender: dima@localhost To: Hidetoshi Shimokawa Cc: freebsd-firewire@freebsd.org, Subject: Re: VAIO Firewire dock station with DVD-ROM In-Reply-To: Message-ID: <20021025134552.A227-100000@localhost> Organization: SINP MSU MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello On Thu, 24 Oct 2002, Hidetoshi Shimokawa wrote: > > > I have Sony VAIO laptop and I have successfuly installed firewire driver (/sys/dev/firewire/*) on it and i'm > > > using DVD on DockStation without any problems except one -- i can't listen audio CD-ROMs. > > > CD-ROM can be mount in usual way and all is going fine, if it has data (not audio) format. > > > > > > If i try to play audio with /usr/sbin/cdcontrol, following messages appear: > > > > > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000025270 > > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 Request aborted > > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 aa 00 0c 00, flags: 0x40, 6b cmd/28b data/32b sense > > > Oct 22 15:42:06 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 > > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > > > Oct 22 15:42:06 VAIO /kernel: (cd0:sbp0:0:0:0): Invalid command operation code > > > > > > Thank you for your advice. > > > > This seems another 6bytes and 10bytes command problem. > > /sys/cam/scsi/scsi_cd.c issues "MODE SENSE(6)" though the DVD drive > > doesn't support it. > > We need some workaround to use "MODE SENSE(10)". > > Could you try this patch? > > Index: sbp.c > =================================================================== > RCS file: /home/firewire/src/sys/dev/firewire/sbp.c,v > retrieving revision 1.173 > diff -u -r1.173 sbp.c > --- sbp.c 23 Oct 2002 13:07:05 -0000 1.173 > +++ sbp.c 24 Oct 2002 08:04:28 -0000 I've applied this patch to what is in the latest archive http://people.freebsd.org/~simokawa/firewire-20020918.tar.gz == Patching file sbp.c using Plan A... Hunk #1 succeeded at 302 (offset 3 lines). Hunk #2 succeeded at 1752 (offset -6 lines). Hunk #3 succeeded at 1831 (offset 3 lines). Hunk #4 succeeded at 2181 with fuzz 1 (offset -18 lines). done == and nothing is changed (kldunload, kldload): Oct 25 14:00:14 VAIO /kernel: sbp_identify Oct 25 14:00:14 VAIO /kernel: sbp_probe Oct 25 14:00:14 VAIO /kernel: sbp_probe Oct 25 14:00:14 VAIO /kernel: sbp0: on firewire0 Oct 25 14:00:14 VAIO /kernel: sbp_attach Oct 25 14:00:14 VAIO /kernel: sbp_post_explore: EUI:0800460300ca1f54 spec=1 key=1. Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 LOGIN Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 ordered:1 type:5 EUI:0800460300ca1f54 node:1 speed:2 maxrec:10 new! Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 'Sony' 'PCGA-DSD5' 'ad1129' Oct 25 14:00:14 VAIO /kernel: sbp_probe Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 login: len 12, ID 0, cmd 0000fffff0010100, recon_hold 0 Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 sbp_busy_timeout Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 sbp_agent_reset Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 sbp_do_attach Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 sbp_cam_scan_lun Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:0008353a4 Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 Request aborted Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 80 00 ff 00 aa 00 0c 00, flags: 0x40, 6b cmd/255b data/18b sense Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 6 code 29 qlfr 0 len 7 Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:0008354d8 Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 Request aborted Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 80 00 ff 00 aa 00 0c 00, flags: 0x40, 6b cmd/255b data/18b sense Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 24 qlfr 0 len 7 Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:00083560c Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 Request aborted Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 aa 00 0c 00, flags: 0xc0, 6b cmd/0b data/32b sense Oct 25 14:00:14 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 Oct 25 14:00:14 VAIO /kernel: cd0 at sbp0 bus 0 target 0 lun 0 Oct 25 14:00:14 VAIO /kernel: cd0: Removable CD-ROM SCSI-0 device Oct 25 14:00:14 VAIO /kernel: cd0: 50.000MB/s transfers Oct 25 14:00:14 VAIO /kernel: cd0: cd present [234175 x 2048 byte records] Oct 25 14:00:21 VAIO /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000836214 Oct 25 14:00:21 VAIO /kernel: sbp0:0:0 Request aborted Oct 25 14:00:21 VAIO /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 15 10 00 00 1c 00 aa 00 0c 00, flags: 0x80, 6b cmd/28b data/32b sense Oct 25 14:00:21 VAIO /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 26 qlfr 0 len 7 Oct 25 14:00:21 VAIO /kernel: (cd0:sbp0:0:0:0): MODE SELECT(06). CDB: 15 10 0 0 1c 0 Oct 25 14:00:21 VAIO /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:26,0 Oct 25 14:00:21 VAIO /kernel: (cd0:sbp0:0:0:0): Invalid field in parameter list I'm using FreeBSD 4.7-STABLE (cvsup'ed about 22-Oct-2002) -- Dmitry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Fri Oct 25 7: 5:20 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69FF637B401; Fri, 25 Oct 2002 07:05:19 -0700 (PDT) Received: from is2.mh.itc.u-tokyo.ac.jp (is2.mh.itc.u-tokyo.ac.jp [133.11.205.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0A6D43E6A; Fri, 25 Oct 2002 07:05:18 -0700 (PDT) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is2.mh.itc.u-tokyo.ac.jp (is2.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is2.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id E72C2378068; Fri, 25 Oct 2002 23:05:17 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is2.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id g9PE5H014049; Fri, 25 Oct 2002 23:05:17 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (nat.keisu.t.u-tokyo.ac.jp [133.11.68.2]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHG21801; Fri, 25 Oct 2002 23:05:16 +0900 (JST) Date: Fri, 25 Oct 2002 23:05:16 +0900 Message-ID: From: Hidetoshi Shimokawa To: Dmitry Mottl Cc: freebsd-firewire@freebsd.org, Subject: Re: VAIO Firewire dock station with DVD-ROM In-Reply-To: <20021025134552.A227-100000@localhost> References: <20021025134552.A227-100000@localhost> User-Agent: Wanderlust/2.9.14 (Unchained Melody) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Fri, 25 Oct 2002 14:03:12 +0400 (MSD), Dmitry Mottl wrote: > > Could you try this patch? > > > > Index: sbp.c > > =================================================================== > > RCS file: /home/firewire/src/sys/dev/firewire/sbp.c,v > > retrieving revision 1.173 > > diff -u -r1.173 sbp.c > > --- sbp.c 23 Oct 2002 13:07:05 -0000 1.173 > > +++ sbp.c 24 Oct 2002 08:04:28 -0000 > > I've applied this patch to what is in the latest archive > http://people.freebsd.org/~simokawa/firewire-20020918.tar.gz > > == > Patching file sbp.c using Plan A... > Hunk #1 succeeded at 302 (offset 3 lines). > Hunk #2 succeeded at 1752 (offset -6 lines). > Hunk #3 succeeded at 1831 (offset 3 lines). > Hunk #4 succeeded at 2181 with fuzz 1 (offset -18 lines). > done > == > > and nothing is changed (kldunload, kldload): Did you really do `make install'? I put the latest version at http://people.freebsd.org/~simokawa/firewire-20021025.tar.gz /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Fri Oct 25 7:13:17 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBA8A37B401 for ; Fri, 25 Oct 2002 07:13:16 -0700 (PDT) Received: from proxy.centtech.com (moat.centtech.com [207.200.51.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C55A43E4A for ; Fri, 25 Oct 2002 07:13:14 -0700 (PDT) (envelope-from anderson@centtech.com) Received: from sprint.centtech.com (sprint.centtech.com [10.177.173.31]) by proxy.centtech.com (8.11.6+Sun/8.11.6) with ESMTP id g9PED1s05431; Fri, 25 Oct 2002 09:13:01 -0500 (CDT) Received: (from root@localhost) by sprint.centtech.com (8.11.6+Sun/8.11.6) id g9PED1u20853; Fri, 25 Oct 2002 09:13:01 -0500 (CDT) Received: from centtech.com (electron [204.177.173.173]) by sprint.centtech.com (8.11.6+Sun/8.11.6) with ESMTP id g9PECvx20838; Fri, 25 Oct 2002 09:12:57 -0500 (CDT) Message-ID: <3DB95167.5070509@centtech.com> Date: Fri, 25 Oct 2002 09:12:55 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hidetoshi Shimokawa Cc: freebsd-firewire@freebsd.org Subject: Firewire Docs References: <20021025134552.A227-100000@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS perl-11 Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG How are we looking for docs on the firewire stuff? Do we need to work on getting some information in the handbook? Eric -- ------------------------------------------------------------------ Eric Anderson Systems Administrator Centaur Technology Beware the fury of a patient man. ------------------------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Fri Oct 25 7:48: 1 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8179737B404 for ; Fri, 25 Oct 2002 07:48:00 -0700 (PDT) Received: from SRDMAIL.SINP.MSU.RU (bigking.sinp.msu.ru [213.131.9.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAD9243E65 for ; Fri, 25 Oct 2002 07:47:59 -0700 (PDT) (envelope-from dima@sinp.msu.ru) Received: from work.artstyle.ru ([193.192.129.60] helo=ns.artstyle.net) by SRDMAIL.SINP.MSU.RU with smtp (Exim 4.10) id 1855nS-000866-00 for freebsd-firewire@freebsd.org; Fri, 25 Oct 2002 18:50:46 +0400 Received: (qmail 32197 invoked from network); 25 Oct 2002 14:48:36 -0000 Received: from admin.internal (10.6.1.1) by mail.artstyle.ru with SMTP; 25 Oct 2002 14:48:36 -0000 Date: Fri, 25 Oct 2002 18:50:20 +0400 (MSD) From: Dmitry Mottl X-X-Sender: dima@localhost To: Hidetoshi Shimokawa Cc: freebsd-firewire@freebsd.org, Subject: Re: VAIO Firewire dock station with DVD-ROM In-Reply-To: Message-ID: <20021025184837.C227-100000@localhost> Organization: SINP MSU MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 25 Oct 2002, Hidetoshi Shimokawa wrote: > Did you really do `make install'? Certainly > > I put the latest version at > http://people.freebsd.org/~simokawa/firewire-20021025.tar.gz The same result. :( -- Dmitry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Fri Oct 25 10: 2:31 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20B1937B404; Fri, 25 Oct 2002 10:02:29 -0700 (PDT) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [133.11.205.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C03443EAA; Fri, 25 Oct 2002 10:02:23 -0700 (PDT) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from is1.mh.itc.u-tokyo.ac.jp (is1.mh.itc.u-tokyo.ac.jp [127.0.0.1]) by is1.mh.itc.u-tokyo.ac.jp (Postfix) with ESMTP id 25314218124; Sat, 26 Oct 2002 02:02:17 +0900 (JST) Received: from mailhosting.itc.u-tokyo.ac.jp (IDENT:mirapoint@mailhosting.itc.u-tokyo.ac.jp [133.11.205.3]) by is1.mh.itc.u-tokyo.ac.jp (8.11.3/8.11.3) with ESMTP id g9PH2Hu27133; Sat, 26 Oct 2002 02:02:17 +0900 Received: from ett.sat.t.u-tokyo.ac.jp (nat.keisu.t.u-tokyo.ac.jp [133.11.68.2]) by mailhosting.itc.u-tokyo.ac.jp (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id AHG23047; Sat, 26 Oct 2002 02:02:16 +0900 (JST) Date: Sat, 26 Oct 2002 02:02:16 +0900 Message-ID: From: Hidetoshi Shimokawa To: Dmitry Mottl Cc: freebsd-firewire@freebsd.org, Subject: Re: VAIO Firewire dock station with DVD-ROM In-Reply-To: <20021025184837.C227-100000@localhost> References: <20021025184837.C227-100000@localhost> User-Agent: Wanderlust/2.9.14 (Unchained Melody) REMI/1.14.3 (Matsudai) FLIM/1.14.3 (=?ISO-8859-1?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4 (patch 8) (Honest Recruiter) (i386--freebsd) X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7: #j7i14gu$jgR\S*&C3R/pJX List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At Fri, 25 Oct 2002 18:50:20 +0400 (MSD), Dmitry Mottl wrote: > > On Fri, 25 Oct 2002, Hidetoshi Shimokawa wrote: > > > Did you really do `make install'? > Certainly > > > > I put the latest version at > > http://people.freebsd.org/~simokawa/firewire-20021025.tar.gz > The same result. :( O.K. I understand the problem. Please note that the patch worked somehow. Without the patch, the MODE_SENSE(6) failed with "Invalid command operation code", on the other hand, with the patch, MODE_SELECT(6) (which is actually transformed to MODE_SELECT(10)) failed with 'Invalid field in parameter list'. This is because MODE_SENSE/SELECT(6) and MODE_SENSE/SELECT(10) use different scsi_mode_header6/10(see scsi_all.h) and their parameter list aren't compatible. This is out of the scope of the patch. I think umass has same problem. I don't have any quick solution. Maybe, we have to wait for CAM_NEW_TRAN_CODE. (If your dvd drive is the only cd drive connected to your machine, you can hack the scsi_cd.c to use 10 bytes command.) /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Sat Oct 26 23:13:17 2002 Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8AE2B37B401; Sat, 26 Oct 2002 23:12:48 -0700 (PDT) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D32543E4A; Sat, 26 Oct 2002 23:12:45 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.5/8.12.5) with ESMTP id g9R6CeKD076166; Sun, 27 Oct 2002 00:12:40 -0600 (MDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id g9R6Ccxg076165; Sun, 27 Oct 2002 00:12:38 -0600 (MDT) (envelope-from ken) Date: Sun, 27 Oct 2002 00:12:38 -0600 From: "Kenneth D. Merry" To: Hidetoshi Shimokawa Cc: Dmitry Mottl , freebsd-firewire@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Subject: Re: VAIO Firewire dock station with DVD-ROM Message-ID: <20021027001238.A76092@panzer.kdm.org> References: <20021025184837.C227-100000@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from simokawa@sat.t.u-tokyo.ac.jp on Sat, Oct 26, 2002 at 02:02:16AM +0900 Sender: owner-freebsd-firewire@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Oct 26, 2002 at 02:02:16 +0900, Hidetoshi Shimokawa wrote: > At Fri, 25 Oct 2002 18:50:20 +0400 (MSD), > Dmitry Mottl wrote: > > > > On Fri, 25 Oct 2002, Hidetoshi Shimokawa wrote: > > > > > Did you really do `make install'? > > Certainly > > > > > > I put the latest version at > > > http://people.freebsd.org/~simokawa/firewire-20021025.tar.gz > > The same result. :( > > O.K. I understand the problem. > > Please note that the patch worked somehow. Without the patch, > the MODE_SENSE(6) failed with "Invalid command operation code", on > the other hand, with the patch, MODE_SELECT(6) (which is actually > transformed to MODE_SELECT(10)) failed with 'Invalid field in > parameter list'. > > This is because MODE_SENSE/SELECT(6) and MODE_SENSE/SELECT(10) use > different scsi_mode_header6/10(see scsi_all.h) and their parameter > list aren't compatible. This is out of the scope of the patch. > I think umass has same problem. Oops, you're right. It'll cause weird problems with mode sense and mode select, definitely. We should probably just take out the mode sense and mode select translation code in umass, since I don't think there's a good way to do translation at the SIM layer for either command. > I don't have any quick solution. > Maybe, we have to wait for CAM_NEW_TRAN_CODE. > > (If your dvd drive is the only cd drive connected to your machine, > you can hack the scsi_cd.c to use 10 bytes command.) I've attached a patch that should work. I've tested this with a SCSI CDROM, but obviously it doesn't exhibit the same behavior. Can you shed some light on what sort of drive this is? Is this a SCSI-over-firewire device, or is it on an ATAPI converter, or what? i.e. any clues on why it is rejecting 6 byte commands? This patch isn't in its final form, and definitely needs to be reviewed/tested. Unfortunately, due to the problems that Shimokawa-san pointed out with mode sense/select, doing translation down in the SIM layer isn't going to work -- it has to be done in the peripheral driver, at least for mode sense and mode select. (The reason is that the peripheral driver can know whether or not it can increase the length of the parameter list, which is needed to switch from a 6 byte to a 10 byte command. The SIM driver won't know, and so it can't really do anything.) This patch is also a little more hackish than I would like. Doing things via the CAM_NEW_TRAN_CODE approach is definitely the right thing to do. Make sure you aren't using the patch Shimokawa-san gave you to translate commands when you try this patch. Ken -- Kenneth Merry ken@kdm.org --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="scsi_cd.cmdsize.20021026" ==== //depot/FreeBSD-ken/src/sys/cam/scsi/scsi_all.c#22 - /usr/home/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_all.c ==== *** /tmp/tmp.331.0 Sat Oct 26 23:35:11 2002 --- /usr/home/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_all.c Thu Oct 17 23:19:51 2002 *************** *** 2447,2458 **** u_int8_t page, u_int8_t *param_buf, u_int32_t param_len, u_int8_t sense_len, u_int32_t timeout) { u_int8_t cdb_len; /* * Use the smallest possible command to perform the operation. */ ! if (param_len < 256) { /* * We can fit in a 6 byte cdb. */ --- 2447,2470 ---- u_int8_t page, u_int8_t *param_buf, u_int32_t param_len, u_int8_t sense_len, u_int32_t timeout) { + return(scsi_mode_sense_len(csio, retries, cbfcnp, tag_action, dbd, + page_code, page, param_buf, param_len, 0, + sense_len, timeout)); + } + void + scsi_mode_sense_len(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, int dbd, u_int8_t page_code, + u_int8_t page, u_int8_t *param_buf, u_int32_t param_len, + int minimum_cmd_size, u_int8_t sense_len, u_int32_t timeout) + { u_int8_t cdb_len; /* * Use the smallest possible command to perform the operation. */ ! if ((param_len < 256) ! && (minimum_cmd_size < 10)) { /* * We can fit in a 6 byte cdb. */ *************** *** 2500,2511 **** u_int8_t *param_buf, u_int32_t param_len, u_int8_t sense_len, u_int32_t timeout) { u_int8_t cdb_len; /* * Use the smallest possible command to perform the operation. */ ! if (param_len < 256) { /* * We can fit in a 6 byte cdb. */ --- 2512,2537 ---- u_int8_t *param_buf, u_int32_t param_len, u_int8_t sense_len, u_int32_t timeout) { + return(scsi_mode_select_len(csio, retries, cbfcnp, tag_action, + scsi_page_fmt, save_pages, param_buf, + param_len, 0, sense_len, timeout)); + } + + void + scsi_mode_select_len(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int8_t tag_action, int scsi_page_fmt, int save_pages, + u_int8_t *param_buf, u_int32_t param_len, + int minimum_cmd_size, u_int8_t sense_len, + u_int32_t timeout) + { u_int8_t cdb_len; /* * Use the smallest possible command to perform the operation. */ ! if ((param_len < 256) ! && (minimum_cmd_size < 10)) { /* * We can fit in a 6 byte cdb. */ ==== //depot/FreeBSD-ken/src/sys/cam/scsi/scsi_all.h#11 - /usr/home/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_all.h ==== *** /tmp/tmp.331.1 Sat Oct 26 23:35:11 2002 --- /usr/home/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_all.h Thu Oct 17 23:19:51 2002 *************** *** 926,931 **** --- 926,940 ---- u_int8_t *param_buf, u_int32_t param_len, u_int8_t sense_len, u_int32_t timeout); + void scsi_mode_sense_len(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, + union ccb *), + u_int8_t tag_action, int dbd, + u_int8_t page_code, u_int8_t page, + u_int8_t *param_buf, u_int32_t param_len, + int minimum_cmd_size, u_int8_t sense_len, + u_int32_t timeout); + void scsi_mode_select(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), *************** *** 933,938 **** --- 942,955 ---- int save_pages, u_int8_t *param_buf, u_int32_t param_len, u_int8_t sense_len, u_int32_t timeout); + + void scsi_mode_select_len(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, + union ccb *), + u_int8_t tag_action, int scsi_page_fmt, + int save_pages, u_int8_t *param_buf, + u_int32_t param_len, int minimum_cmd_size, + u_int8_t sense_len, u_int32_t timeout); void scsi_log_sense(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), ==== //depot/FreeBSD-ken/src/sys/cam/scsi/scsi_cd.c#28 - /usr/home/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_cd.c ==== *** /tmp/tmp.331.2 Sat Oct 26 23:35:11 2002 --- /usr/home/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_cd.c Sat Oct 26 23:27:15 2002 *************** *** 1,6 **** /* * Copyright (c) 1997 Justin T. Gibbs. ! * Copyright (c) 1997, 1998, 1999, 2000, 2001 Kenneth D. Merry. * All rights reserved. * * Redistribution and use in source and binary forms, with or without --- 1,6 ---- /* * Copyright (c) 1997 Justin T. Gibbs. ! * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 Kenneth D. Merry. * All rights reserved. * * Redistribution and use in source and binary forms, with or without *************** *** 137,142 **** --- 137,143 ---- struct cam_periph *periph; dev_t dev; eventhandler_tag clonetag; + int minimum_command_size; }; struct cd_quirk_entry { *************** *** 203,208 **** --- 204,210 ---- u_int32_t priority); static void cddone(struct cam_periph *periph, union ccb *start_ccb); + static int cd6byteworkaround(union ccb *ccb); static int cderror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags); static void cdprevent(struct cam_periph *periph, int action); *************** *** 211,219 **** u_int32_t start, struct cd_toc_entry *data, u_int32_t len); static int cdgetmode(struct cam_periph *periph, ! struct cd_mode_data *data, u_int32_t page); static int cdsetmode(struct cam_periph *periph, ! struct cd_mode_data *data); static int cdplay(struct cam_periph *periph, u_int32_t blk, u_int32_t len); static int cdreadsubchannel(struct cam_periph *periph, --- 213,221 ---- u_int32_t start, struct cd_toc_entry *data, u_int32_t len); static int cdgetmode(struct cam_periph *periph, ! struct cd_mode_params *data, u_int32_t page); static int cdsetmode(struct cam_periph *periph, ! struct cd_mode_params *data); static int cdplay(struct cam_periph *periph, u_int32_t blk, u_int32_t len); static int cdreadsubchannel(struct cam_periph *periph, *************** *** 609,614 **** --- 611,618 ---- else softc->quirks = CD_Q_NONE; + softc->minimum_command_size = 6; + /* * We need to register the statistics structure for this device, * but we don't have the blocksize yet for it. So, we register *************** *** 1785,1793 **** { struct ioc_play_track *args = (struct ioc_play_track *) addr; ! struct cd_mode_data *data; ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, --- 1789,1798 ---- { struct ioc_play_track *args = (struct ioc_play_track *) addr; ! struct cd_mode_params *data; ! union cd_pages *page; ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, *************** *** 1798,1805 **** free(data, M_TEMP); break; } ! data->page.audio.flags &= ~CD_PA_SOTC; ! data->page.audio.flags |= CD_PA_IMMED; error = cdsetmode(periph, data); free(data, M_TEMP); if (error) --- 1803,1814 ---- free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.flags &= ~CD_PA_SOTC; ! page->audio.flags |= CD_PA_IMMED; error = cdsetmode(periph, data); free(data, M_TEMP); if (error) *************** *** 1819,1827 **** { struct ioc_play_msf *args = (struct ioc_play_msf *) addr; ! struct cd_mode_data *data; ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, --- 1828,1837 ---- { struct ioc_play_msf *args = (struct ioc_play_msf *) addr; ! struct cd_mode_params *data; ! union cd_pages *page; ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, *************** *** 1832,1839 **** free(data, M_TEMP); break; } ! data->page.audio.flags &= ~CD_PA_SOTC; ! data->page.audio.flags |= CD_PA_IMMED; error = cdsetmode(periph, data); free(data, M_TEMP); if (error) --- 1842,1853 ---- free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.flags &= ~CD_PA_SOTC; ! page->audio.flags |= CD_PA_IMMED; error = cdsetmode(periph, data); free(data, M_TEMP); if (error) *************** *** 1851,1862 **** { struct ioc_play_blocks *args = (struct ioc_play_blocks *) addr; ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCPLAYBLOCKS\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); --- 1865,1877 ---- { struct ioc_play_blocks *args = (struct ioc_play_blocks *) addr; ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCPLAYBLOCKS\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); *************** *** 1864,1871 **** free(data, M_TEMP); break; } ! data->page.audio.flags &= ~CD_PA_SOTC; ! data->page.audio.flags |= CD_PA_IMMED; error = cdsetmode(periph, data); free(data, M_TEMP); if (error) --- 1879,1890 ---- free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.flags &= ~CD_PA_SOTC; ! page->audio.flags |= CD_PA_IMMED; error = cdsetmode(periph, data); free(data, M_TEMP); if (error) *************** *** 2158,2181 **** case CDIOCSETPATCH: { struct ioc_patch *arg = (struct ioc_patch *) addr; ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETPATCH\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! data->page.audio.port[LEFT_PORT].channels = arg->patch[0]; ! data->page.audio.port[RIGHT_PORT].channels = arg->patch[1]; ! data->page.audio.port[2].channels = arg->patch[2]; ! data->page.audio.port[3].channels = arg->patch[3]; error = cdsetmode(periph, data); free(data, M_TEMP); } --- 2177,2205 ---- case CDIOCSETPATCH: { struct ioc_patch *arg = (struct ioc_patch *) addr; ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETPATCH\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.port[LEFT_PORT].channels = arg->patch[0]; ! page->audio.port[RIGHT_PORT].channels = arg->patch[1]; ! page->audio.port[2].channels = arg->patch[2]; ! page->audio.port[3].channels = arg->patch[3]; error = cdsetmode(periph, data); free(data, M_TEMP); } *************** *** 2183,2350 **** case CDIOCGETVOL: { struct ioc_vol *arg = (struct ioc_vol *) addr; ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCGETVOL\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } arg->vol[LEFT_PORT] = ! data->page.audio.port[LEFT_PORT].volume; arg->vol[RIGHT_PORT] = ! data->page.audio.port[RIGHT_PORT].volume; ! arg->vol[2] = data->page.audio.port[2].volume; ! arg->vol[3] = data->page.audio.port[3].volume; free(data, M_TEMP); } break; case CDIOCSETVOL: { struct ioc_vol *arg = (struct ioc_vol *) addr; ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETVOL\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! data->page.audio.port[LEFT_PORT].channels = CHANNEL_0; ! data->page.audio.port[LEFT_PORT].volume = arg->vol[LEFT_PORT]; ! data->page.audio.port[RIGHT_PORT].channels = CHANNEL_1; ! data->page.audio.port[RIGHT_PORT].volume = arg->vol[RIGHT_PORT]; ! data->page.audio.port[2].volume = arg->vol[2]; ! data->page.audio.port[3].volume = arg->vol[3]; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETMONO: { ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETMONO\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! data->page.audio.port[LEFT_PORT].channels = LEFT_CHANNEL | RIGHT_CHANNEL; ! data->page.audio.port[RIGHT_PORT].channels = LEFT_CHANNEL | RIGHT_CHANNEL; ! data->page.audio.port[2].channels = 0; ! data->page.audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETSTEREO: { ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETSTEREO\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! data->page.audio.port[LEFT_PORT].channels = LEFT_CHANNEL; ! data->page.audio.port[RIGHT_PORT].channels = RIGHT_CHANNEL; ! data->page.audio.port[2].channels = 0; ! data->page.audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETMUTE: { ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETMUTE\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! data->page.audio.port[LEFT_PORT].channels = 0; ! data->page.audio.port[RIGHT_PORT].channels = 0; ! data->page.audio.port[2].channels = 0; ! data->page.audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETLEFT: { ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETLEFT\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! data->page.audio.port[LEFT_PORT].channels = ! LEFT_CHANNEL; ! data->page.audio.port[RIGHT_PORT].channels = ! LEFT_CHANNEL; ! data->page.audio.port[2].channels = 0; ! data->page.audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETRIGHT: { ! struct cd_mode_data *data; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETRIGHT\n")); ! data = malloc(sizeof(struct cd_mode_data), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! data->page.audio.port[LEFT_PORT].channels = ! RIGHT_CHANNEL; ! data->page.audio.port[RIGHT_PORT].channels = ! RIGHT_CHANNEL; ! data->page.audio.port[2].channels = 0; ! data->page.audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } --- 2207,2405 ---- case CDIOCGETVOL: { struct ioc_vol *arg = (struct ioc_vol *) addr; ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCGETVOL\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } + page = (data->cdb_size == 10) ? + &data->mode_data.mode_data_10.page : + &data->mode_data.mode_data_6.page; + arg->vol[LEFT_PORT] = ! page->audio.port[LEFT_PORT].volume; arg->vol[RIGHT_PORT] = ! page->audio.port[RIGHT_PORT].volume; ! arg->vol[2] = page->audio.port[2].volume; ! arg->vol[3] = page->audio.port[3].volume; free(data, M_TEMP); } break; case CDIOCSETVOL: { struct ioc_vol *arg = (struct ioc_vol *) addr; ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETVOL\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.port[LEFT_PORT].channels = CHANNEL_0; ! page->audio.port[LEFT_PORT].volume = arg->vol[LEFT_PORT]; ! page->audio.port[RIGHT_PORT].channels = CHANNEL_1; ! page->audio.port[RIGHT_PORT].volume = arg->vol[RIGHT_PORT]; ! page->audio.port[2].volume = arg->vol[2]; ! page->audio.port[3].volume = arg->vol[3]; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETMONO: { ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETMONO\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.port[LEFT_PORT].channels = LEFT_CHANNEL | RIGHT_CHANNEL; ! page->audio.port[RIGHT_PORT].channels = LEFT_CHANNEL | RIGHT_CHANNEL; ! page->audio.port[2].channels = 0; ! page->audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETSTEREO: { ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETSTEREO\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.port[LEFT_PORT].channels = LEFT_CHANNEL; ! page->audio.port[RIGHT_PORT].channels = RIGHT_CHANNEL; ! page->audio.port[2].channels = 0; ! page->audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETMUTE: { ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETMUTE\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.port[LEFT_PORT].channels = 0; ! page->audio.port[RIGHT_PORT].channels = 0; ! page->audio.port[2].channels = 0; ! page->audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETLEFT: { ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETLEFT\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.port[LEFT_PORT].channels = LEFT_CHANNEL; ! page->audio.port[RIGHT_PORT].channels = LEFT_CHANNEL; ! page->audio.port[2].channels = 0; ! page->audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } break; case CDIOCSETRIGHT: { ! struct cd_mode_params *data; ! union cd_pages *page; CAM_DEBUG(periph->path, CAM_DEBUG_SUBTRACE, ("trying to do CDIOCSETRIGHT\n")); ! data = malloc(sizeof(struct cd_mode_params), M_TEMP, M_WAITOK); error = cdgetmode(periph, data, AUDIO_PAGE); if (error) { free(data, M_TEMP); break; } ! page = (data->cdb_size == 10) ? ! &data->mode_data.mode_data_10.page : ! &data->mode_data.mode_data_6.page; ! ! page->audio.port[LEFT_PORT].channels = RIGHT_CHANNEL; ! page->audio.port[RIGHT_PORT].channels = RIGHT_CHANNEL; ! page->audio.port[2].channels = 0; ! page->audio.port[3].channels = 0; error = cdsetmode(periph, data); free(data, M_TEMP); } *************** *** 2521,2534 **** --- 2576,2702 ---- } static int + cd6byteworkaround(union ccb *ccb) + { + u_int8_t *cdb; + struct cam_periph *periph; + struct cd_softc *softc; + struct cd_mode_params *params; + int frozen, len; + + periph = xpt_path_periph(ccb->ccb_h.path); + softc = (struct cd_softc *)periph->softc; + + cdb = ccb->csio.cdb_io.cdb_bytes; + + if ((ccb->ccb_h.flags & CAM_CDB_POINTER) + || ((cdb[0] != MODE_SENSE_6) + && (cdb[0] != MODE_SELECT_6))) + return (0); + + /* + * Because there is no other convenient place to stash the overall + * cd_mode_params structure pointer, we have to grab it like this. + * This means that ALL MODE_SENSE and MODE_SELECT requests in the + * cd(4) driver MUST go through cdgetmode() and cdsetmode()! + */ + params = (struct cd_mode_params *)(ccb->csio.data_ptr - + __offsetof(struct cd_mode_params, mode_data)); + + params->cdb_size = 10; + len = sizeof(params->mode_data.mode_data_10); + ccb->csio.dxfer_len = len; + softc->minimum_command_size = 10; + xpt_print_path(ccb->ccb_h.path); + printf("MODE_SENSE(6)/MODE_SELECT(6) failed, increasing " + "minimum CDB size to 10 bytes\n"); + + if (cdb[0] == MODE_SENSE_6) { + struct scsi_mode_sense_10 ms10; + struct scsi_mode_sense_6 *ms6; + + ms6 = (struct scsi_mode_sense_6 *)cdb; + + bzero(&ms10, sizeof(ms10)); + /* first 3 bytes are the same */ + bcopy(ms6, &ms10, 3); + + scsi_ulto2b(len, ms10.length); + ms10.control = ms6->control; + } else { + struct scsi_mode_select_10 ms10; + struct scsi_mode_select_6 *ms6; + struct cd_mode_data_10 *mode_data_10; + struct cd_mode_data *mode_data_6; + + ms6 = (struct scsi_mode_select_6 *)cdb; + + bzero(&ms10, sizeof(ms10)); + ms10.opcode = ms6->opcode; + ms10.byte2 = ms6->byte2; + + mode_data_10 = ¶ms->mode_data.mode_data_10; + mode_data_6 = ¶ms->mode_data.mode_data_6; + + /* + * Since the 6 byte parameter header is shorter than the 10 + * byte parameter header, we need to copy the actual mode + * page data, so it winds up in the right place. The + * regions will overlap, but bcopy() does the right thing. + */ + bcopy(&mode_data_6->page, &mode_data_10->page, + sizeof(mode_data_10->page)); + + /* Make sure these fields are set correctly. */ + scsi_ulto2b(0, mode_data_10->header.data_length); + mode_data_10->header.medium_type = 0; + + scsi_ulto2b(len, ms10.length); + ms10.control = ms6->control; + } + + frozen = (ccb->ccb_h.status & CAM_DEV_QFRZN) != 0; + ccb->ccb_h.status = CAM_REQUEUE_REQ; + xpt_action(ccb); + if (frozen) { + cam_release_devq(ccb->ccb_h.path, + /*relsim_flags*/0, + /*openings*/0, + /*timeout*/0, + /*getcount_only*/0); + } + + return (ERESTART); + } + + static int cderror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { struct cd_softc *softc; struct cam_periph *periph; + int error; periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct cd_softc *)periph->softc; + error = 0; + + if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR) + && (ccb->ccb_h.status & CAM_AUTOSNS_VALID) + && (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) + && ((ccb->ccb_h.flags & CAM_SENSE_PHYS) == 0) + && ((ccb->ccb_h.flags & CAM_SENSE_PTR) == 0)) { + int sense_key, error_code, asc, ascq; + + scsi_extract_sense(&ccb->csio.sense_data, + &error_code, &sense_key, &asc, &ascq); + if (sense_key == SSD_KEY_ILLEGAL_REQUEST) + error = cd6byteworkaround(ccb); + } + + if (error == ERESTART) + return (error); + /* * XXX * Until we have a better way of doing pack validation, *************** *** 2638,2673 **** } static int ! cdgetmode(struct cam_periph *periph, struct cd_mode_data *data, u_int32_t page) { ! struct scsi_mode_sense_6 *scsi_cmd; ! struct ccb_scsiio *csio; union ccb *ccb; int error; ccb = cdgetccb(periph, /* priority */ 1); csio = &ccb->csio; bzero(data, sizeof(*data)); ! cam_fill_csio(csio, ! /* retries */ 1, ! /* cbfcnp */ cddone, ! /* flags */ CAM_DIR_IN, ! /* tag_action */ MSG_SIMPLE_Q_TAG, ! /* data_ptr */ (u_int8_t *)data, ! /* dxfer_len */ sizeof(*data), ! /* sense_len */ SSD_FULL_SIZE, ! sizeof(struct scsi_mode_sense_6), ! /* timeout */ 50000); ! scsi_cmd = (struct scsi_mode_sense_6 *)&csio->cdb_io.cdb_bytes; ! bzero (scsi_cmd, sizeof(*scsi_cmd)); ! scsi_cmd->page = page; ! scsi_cmd->length = sizeof(*data) & 0xff; ! scsi_cmd->opcode = MODE_SENSE; error = cdrunccb(ccb, cderror, /*cam_flags*/CAM_RETRY_SELTO, /*sense_flags*/SF_RETRY_UA); --- 2806,2855 ---- } + /* + * All MODE_SENSE requests in the cd(4) driver MUST go through this + * routine. See comments in cd6byteworkaround() for details. + */ static int ! cdgetmode(struct cam_periph *periph, struct cd_mode_params *data, ! u_int32_t page) { ! struct ccb_scsiio *csio; ! struct cd_softc *softc; union ccb *ccb; + int param_len; int error; + softc = (struct cd_softc *)periph->softc; + ccb = cdgetccb(periph, /* priority */ 1); csio = &ccb->csio; bzero(data, sizeof(*data)); ! data->cdb_size = softc->minimum_command_size; ! if (data->cdb_size < 10) ! param_len = sizeof(data->mode_data.mode_data_6); ! else ! param_len = sizeof(data->mode_data.mode_data_10); ! scsi_mode_sense_len(csio, ! /* retries */ 1, ! /* cbfcnp */ cddone, ! /* tag_action */ MSG_SIMPLE_Q_TAG, ! /* dbd */ 0, ! /* page_code */ SMS_PAGE_CTRL_CURRENT, ! /* page */ page, ! /* param_buf */ (u_int8_t *)&data->mode_data, ! /* param_len */ param_len, ! /* minimum_cmd_size */ softc->minimum_command_size, ! /* sense_len */ SSD_FULL_SIZE, ! /* timeout */ 50000); ! /* ! * Save this so we can pull it out and reformat if necessary. ! */ ! /* csio->ccb_h.periph_priv.entries[0].ptr = data; */ error = cdrunccb(ccb, cderror, /*cam_flags*/CAM_RETRY_SELTO, /*sense_flags*/SF_RETRY_UA); *************** *** 2677,2720 **** return(error); } static int ! cdsetmode(struct cam_periph *periph, struct cd_mode_data *data) { ! struct scsi_mode_select_6 *scsi_cmd; ! struct ccb_scsiio *csio; union ccb *ccb; int error; ccb = cdgetccb(periph, /* priority */ 1); csio = &ccb->csio; error = 0; ! cam_fill_csio(csio, ! /* retries */ 1, ! /* cbfcnp */ cddone, ! /* flags */ CAM_DIR_OUT, ! /* tag_action */ MSG_SIMPLE_Q_TAG, ! /* data_ptr */ (u_int8_t *)data, ! /* dxfer_len */ sizeof(*data), ! /* sense_len */ SSD_FULL_SIZE, ! sizeof(struct scsi_mode_select_6), ! /* timeout */ 50000); ! scsi_cmd = (struct scsi_mode_select_6 *)&csio->cdb_io.cdb_bytes; ! bzero(scsi_cmd, sizeof(*scsi_cmd)); ! scsi_cmd->opcode = MODE_SELECT; ! scsi_cmd->byte2 |= SMS_PF; ! scsi_cmd->length = sizeof(*data) & 0xff; ! data->header.data_length = 0; ! /* ! * SONY drives do not allow a mode select with a medium_type ! * value that has just been returned by a mode sense; use a ! * medium_type of 0 (Default) instead. */ ! data->header.medium_type = 0; error = cdrunccb(ccb, cderror, /*cam_flags*/CAM_RETRY_SELTO, /*sense_flags*/SF_RETRY_UA); --- 2859,2939 ---- return(error); } + /* + * All MODE_SELECT requests in the cd(4) driver MUST go through this + * routine. See comments in cd6byteworkaround() for details. + */ static int ! cdsetmode(struct cam_periph *periph, struct cd_mode_params *data) { ! struct ccb_scsiio *csio; ! struct cd_softc *softc; union ccb *ccb; + int cdb_size, param_len; int error; + softc = (struct cd_softc *)periph->softc; + ccb = cdgetccb(periph, /* priority */ 1); csio = &ccb->csio; error = 0; ! /* ! * If the data is formatted for the 10 byte version of the mode ! * select parameter list, we need to use the 10 byte CDB. ! * Otherwise, we use whatever the stored minimum command size. ! */ ! if (data->cdb_size == 10) ! cdb_size = data->cdb_size; ! else ! cdb_size = softc->minimum_command_size; ! if (cdb_size >= 10) { ! struct cd_mode_data_10 *mode_data; ! mode_data = &data->mode_data.mode_data_10; ! ! scsi_ulto2b(0, mode_data->header.data_length); ! /* ! * SONY drives do not allow a mode select with a medium_type ! * value that has just been returned by a mode sense; use a ! * medium_type of 0 (Default) instead. ! */ ! mode_data->header.medium_type = 0; ! param_len = sizeof(*mode_data); ! } else { ! struct cd_mode_data *mode_data; ! ! mode_data = &data->mode_data.mode_data_6; ! ! mode_data->header.data_length = 0; ! /* ! * SONY drives do not allow a mode select with a medium_type ! * value that has just been returned by a mode sense; use a ! * medium_type of 0 (Default) instead. ! */ ! mode_data->header.medium_type = 0; ! param_len = sizeof(*mode_data); ! } ! ! scsi_mode_select_len(csio, ! /* retries */ 1, ! /* cbfcnp */ cddone, ! /* tag_action */ MSG_SIMPLE_Q_TAG, ! /* scsi_page_fmt */ 1, ! /* save_pages */ 0, ! /* param_buf */ (u_int8_t *)&data->mode_data, ! /* param_len */ param_len, ! /* minimum_cmd_size */ cdb_size, ! /* sense_len */ SSD_FULL_SIZE, ! /* timeout */ 50000); ! ! /* ! * Save this so we can pull it out and reformat if necessary. */ ! /* csio->ccb_h.periph_priv.entries[0].ptr = data; */ error = cdrunccb(ccb, cderror, /*cam_flags*/CAM_RETRY_SELTO, /*sense_flags*/SF_RETRY_UA); ==== //depot/FreeBSD-ken/src/sys/cam/scsi/scsi_cd.h#5 - /usr/home/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_cd.h ==== *** /tmp/tmp.331.3 Sat Oct 26 23:35:11 2002 --- /usr/home/ken/perforce/FreeBSD-ken/src/sys/cam/scsi/scsi_cd.h Sat Oct 26 21:20:13 2002 *************** *** 689,699 **** --- 689,718 ---- }audio; }; + struct cd_mode_data_10 + { + struct scsi_mode_header_10 header; + struct scsi_mode_blk_desc blk_desc; + union cd_pages page; + }; + struct cd_mode_data { struct scsi_mode_header_6 header; struct scsi_mode_blk_desc blk_desc; union cd_pages page; + }; + + union cd_mode_data_6_10 + { + struct cd_mode_data mode_data_6; + struct cd_mode_data_10 mode_data_10; + }; + + struct cd_mode_params + { + int cdb_size; + union cd_mode_data_6_10 mode_data; }; __BEGIN_DECLS --/04w6evG8XlLl3ft-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message