From owner-freebsd-firewire Sun Nov 3 23:33:14 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 839AA37B401; Sun, 3 Nov 2002 23:33:09 -0800 (PST) Received: from mail3.panix.com (mail3.panix.com [166.84.1.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA0C143E4A; Sun, 3 Nov 2002 23:33:08 -0800 (PST) (envelope-from kleiner@panix.com) Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mail3.panix.com (Postfix) with ESMTP id C6B4498320; Mon, 4 Nov 2002 02:33:02 -0500 (EST) Received: (from kleiner@localhost) by panix5.panix.com (8.11.6/8.8.8/PanixN1.0) id gA47X2228841; Mon, 4 Nov 2002 02:33:02 -0500 (EST) Date: Mon, 4 Nov 2002 02:33:02 -0500 From: David Kleiner 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: <20021104073302.GA27648@panix.com> References: <20021025184837.C227-100000@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i 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 Hidetoshi-san, I have just rebuilt my RELENG_4 world with just imported firewire support. Here is what I am getting when trying to run cdcontrol: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:00002413c sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000024270 sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:0000243a4 sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:0000244d8 sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:00002460c sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000024740 sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000024874 sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:0000249a8 sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:000024adc sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 6 code 28 qlfr 0 len 7 sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:00002547c sbp0:0:0 Request aborted 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 sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 (cd0:sbp0:0:0:0): Invalid command operation code I have firewire in the kernel config: device firewire # Firewire bus code device sbp # SCSI over Firewire as well as device scbus # SCSI bus (required) device da # Direct Access (disks) #device sa # Sequential Access (tape etc) device cd # CD device pass # Passthrough device (direct SCSI access) There is no atapicd device. Here are the firewire-related boot messages: Nov 3 17:20:39 mal /kernel: fwohci0: mem 0xf41000 00-0xf4103fff,0xf4105000-0xf41057ff irq 3 at device 0.0 on pci1 Nov 3 17:20:39 mal /kernel: fwohci0: PCI bus latency was changing to 250. Nov 3 17:20:39 mal /kernel: cache size 8. Nov 3 17:20:39 mal /kernel: fwohci0: OHCI version 1.0 (ROM=1) Nov 3 17:20:39 mal /kernel: fwohci0: No. of Isochronous channel is 4. Nov 3 17:20:39 mal /kernel: fwohci0: resetting OHCI...done (0) Nov 3 17:20:39 mal /kernel: fwohci0: BUS_OPT 0xa002 -> 0xf800a002 Nov 3 17:20:39 mal /kernel: fwohci0: Link 1394a available S400, 2 ports, maxrec 2048 bytes. Nov 3 17:20:39 mal /kernel: fwohci0: Enable 1394a Enhancements Nov 3 17:20:39 mal /kernel: fwohci0: EUI64 08:00:46:03:00:c4:89:4d Nov 3 17:20:39 mal /kernel: fwochi_set_intr: 1 Nov 3 17:20:39 mal /kernel: firewire0: on fwohci0 Nov 3 17:20:39 mal /kernel: firewire0: firewire bus attach Nov 3 17:20:39 mal /kernel: sbp_identify Nov 3 17:20:39 mal /kernel: sbp_probe Nov 3 17:20:39 mal /kernel: sbp0: on firewire0 Nov 3 17:20:39 mal /kernel: sbp_attach Nov 3 17:20:39 mal /kernel: ppi0: on ppbus0 Nov 3 17:20:39 mal /kernel: firewire0: BUS reset Nov 3 17:20:39 mal /kernel: firewire0: node_id = 0x8000ffc0, non CYCLEMASTER mo de Nov 3 17:20:39 mal /kernel: firewire0: 2 nodes, maxhop <= 1, cable IRM = 0 (me) Nov 3 17:20:39 mal /kernel: fw_set_bus_manager: 63->0 (loop=0) Nov 3 17:20:39 mal /kernel: send phy_config root_node=-1 gap_count=1 Nov 3 17:20:39 mal /kernel: start AT DMA status=0 Nov 3 17:20:39 mal /kernel: firewire0:Discover new S400 device ID:0800460300ca6 473 Nov 3 17:20:39 mal /kernel: bus_explore done Nov 3 17:20:39 mal /kernel: Device SBP-II Nov 3 17:20:39 mal /kernel: sbp_post_explore: EUI:0800460300ca6473 spec=1 key=1 . Nov 3 17:20:39 mal /kernel: sbp0:0:0 LOGIN Nov 3 17:20:39 mal /kernel: sbp0:0:0 ordered:1 type:5 EUI:0800460300ca6473 node :1 speed:2 maxrec:10 new! Nov 3 17:20:39 mal /kernel: sbp0:0:0 'Sony' 'PCGA-DSM5' 'ad1129' Nov 3 17:20:39 mal /kernel: sbp0:0:0 login: len 12, ID 0, cmd 0000fffff0010100, recon_hold 0 Nov 3 17:20:39 mal /kernel: sbp0:0:0 sbp_busy_timeout Nov 3 17:20:39 mal /kernel: sbp0:0:0 sbp_agent_reset Nov 3 17:20:39 mal /kernel: sbp0:0:0 sbp_do_attach Nov 3 17:20:39 mal /kernel: sbp0:0:0 sbp_cam_scan_lun Nov 3 17:20:39 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:0000323a4 Nov 3 17:20:39 mal /kernel: sbp0:0:0 Request aborted Nov 3 17:20:39 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 80 00 ff 00 00 00 00 00, flags: 0x40, 6b cmd/255b data/18b sense Nov 3 17:20:39 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 24 qlfr 0 len 7 Nov 3 17:20:39 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:0000324d8 Nov 3 17:20:39 mal /kernel: sbp0:0:0 Request aborted Nov 3 17:20:39 mal /kernel: Mounting root from ufs:/dev/ad0s2a Nov 3 17:20:39 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:000032fac Nov 3 17:20:39 mal /kernel: sbp0:0:0 Request aborted Nov 3 17:20:39 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 25 00 00 00 00 00 00 00 00 00, flags: 0x40, 10b cmd/8b data/32b sense Nov 3 17:20:39 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 3a qlfr 0 len 7 Nov 3 17:20:39 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:0000330e0 Nov 3 17:20:39 mal /kernel: sbp0:0:0 Request aborted Nov 3 17:20:39 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 25 00 00 00 00 00 00 00 00 00, flags: 0x40, 10b cmd/8b data/32b sense Nov 3 17:20:39 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 3a qlfr 0 len 7 Nov 3 17:20:39 mal /kernel: cd0 at sbp0 bus 0 target 0 lun 0 Nov 3 17:20:39 mal /kernel: cd0: Removable CD-ROM SCSI- 0 device Nov 3 17:20:39 mal /kernel: cd0: 50.000MB/s transfers Nov 3 17:20:39 mal /kernel: cd0: Attempt to query device size failed: NOT READY , Medium not present The laptop is a VAIO PCG-R505TE + docking station. uname -a: FreeBSD mal 4.7-STABLE FreeBSD 4.7-STABLE #18: Sun Nov 3 17:33:51 PST 2002 root@mal:/home/obj/usr/src/sys/O i386 Thank you, David Kleiner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Mon Nov 4 0:38:29 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 04AC237B401 for ; Mon, 4 Nov 2002 00:38:28 -0800 (PST) Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BE5843E4A for ; Mon, 4 Nov 2002 00:38:27 -0800 (PST) (envelope-from wkb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.12.6/8.12.6) with ESMTP id gA48cKkF026810; Mon, 4 Nov 2002 09:38:20 +0100 (CET) (envelope-from wkb@freebie.xs4all.nl) Received: (from wkb@localhost) by freebie.xs4all.nl (8.12.6/8.12.6/Submit) id gA48cKtD026809; Mon, 4 Nov 2002 09:38:20 +0100 (CET) Date: Mon, 4 Nov 2002 09:38:20 +0100 From: Wilko Bulte To: freebsd-firewire@freebsd.org Cc: Wilko Bulte Subject: fw driver refuses to attach on CPQ EVO N160 Message-ID: <20021104093820.F26631@freebie.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-OS: FreeBSD 4.7-RC X-PGP: finger wilko@freebsd.org 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 Hi there, For fun I just built a -stable kernel with firewire support on my Compaq EVO N160 laptop. Unfortunately the attach fails with: pcib2: at device 30.0 on pci0 pci2: on pcib2 pci2: (vendor=0x14f1, dev=0x2f00) at 4.0 XXXfw: vendid=104c, dev=8023 fwohci0: <1394 Open Host Controller Interface> mem 0xd0204000-0xd0207fff,0xd0201000-0xd02017ff at device 5.0 on pci2 fwohci0: Invalid irq 255 fwohci0: Please switch PNP-OS to 'No' in BIOS device_probe_and_attach: fwohci0 attach returned 6 pcic0: irq 10 at device 6.0 on pci2 pcic0: PCI Memory allocated: 0x88000000 The suggestion to switch off PNP does not work on this notebook as there is no BIOS option to do so. There are hardly any BIOS options anyway, this is an ACPI-heavy machine. Other suggestions? Wilko [please keep me on CC: as I don't subscribe to the fw list] -- | / o / /_ _ wilko@FreeBSD.org |/|/ / / /( (_) Bulte Arnhem, the Netherlands To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Mon Nov 4 18: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 7E1AC37B401; Mon, 4 Nov 2002 18:40:09 -0800 (PST) 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 A715D43E42; Mon, 4 Nov 2002 18:40:08 -0800 (PST) (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 BE8192180F9; Tue, 5 Nov 2002 11:40:02 +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 gA52e2u04949; Tue, 5 Nov 2002 11:40:02 +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 AHH36783; Tue, 5 Nov 2002 11:40:01 +0900 (JST) Date: Tue, 05 Nov 2002 11:40:01 +0900 Message-ID: From: Hidetoshi Shimokawa To: David Kleiner Cc: Dmitry Mottl , freebsd-firewire@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: VAIO Firewire dock station with DVD-ROM In-Reply-To: <20021104073302.GA27648@panix.com> References: <20021025184837.C227-100000@localhost> <20021104073302.GA27648@panix.com> User-Agent: Wanderlust/2.11.0 (Wonderwall) 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 Mon, 4 Nov 2002 02:33:02 -0500, David Kleiner wrote: > > Hidetoshi-san, > > I have just rebuilt my RELENG_4 world with just imported > firewire support. > > Here is what I am getting when trying to run cdcontrol: .. > (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > (cd0:sbp0:0:0:0): Invalid command operation code Could you try the CAM patch which Ken posted to the list? /\ 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 Mon Nov 4 18:57: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 B408237B401 for ; Mon, 4 Nov 2002 18:57:22 -0800 (PST) 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 F16A143E88 for ; Mon, 4 Nov 2002 18:57:21 -0800 (PST) (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 4B99937807B for ; Tue, 5 Nov 2002 11:57:21 +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 gA52vL001785; Tue, 5 Nov 2002 11:57:21 +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 AHH37131; Tue, 5 Nov 2002 11:57:20 +0900 (JST) Date: Tue, 05 Nov 2002 11:57:20 +0900 Message-ID: From: Hidetoshi Shimokawa To: Wilko Bulte Cc: freebsd-firewire@freebsd.org Subject: Re: fw driver refuses to attach on CPQ EVO N160 In-Reply-To: <20021104093820.F26631@freebie.xs4all.nl> References: <20021104093820.F26631@freebie.xs4all.nl> User-Agent: Wanderlust/2.11.0 (Wonderwall) 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 Mon, 4 Nov 2002 09:38:20 +0100, Wilko Bulte wrote: > > Hi there, > > For fun I just built a -stable kernel with firewire support on my > Compaq EVO N160 laptop. Unfortunately the attach fails with: > > pcib2: at device 30.0 on pci0 > pci2: on pcib2 > pci2: (vendor=0x14f1, dev=0x2f00) at 4.0 > XXXfw: vendid=104c, dev=8023 > fwohci0: <1394 Open Host Controller Interface> mem > 0xd0204000-0xd0207fff,0xd0201000-0xd02017ff at device 5.0 on pci2 > fwohci0: Invalid irq 255 > fwohci0: Please switch PNP-OS to 'No' in BIOS > device_probe_and_attach: fwohci0 attach returned 6 > pcic0: irq 10 at device 6.0 on pci2 > pcic0: PCI Memory allocated: 0x88000000 > > The suggestion to switch off PNP does not work on this notebook as > there is no BIOS option to do so. There are hardly any BIOS options > anyway, this is an ACPI-heavy machine. > > Other suggestions? Could you try the following patch to see whether it works or not? Index: fwohci_pci.c =================================================================== RCS file: /pub/FreeBSD-CVS/src/sys/dev/firewire/fwohci_pci.c,v retrieving revision 1.3.2.1 diff -u -r1.3.2.1 fwohci_pci.c --- fwohci_pci.c 3 Nov 2002 10:58:18 -0000 1.3.2.1 +++ fwohci_pci.c 5 Nov 2002 02:54:24 -0000 @@ -145,9 +145,10 @@ fwohci_softc_t *sc = device_get_softc(self); int err; int rid; - int intr; int latency, cache_line; u_int16_t cmd; +#if 0 + int intr; /* For the moment, put in a message stating what is wrong */ intr = pci_read_config(self, PCIR_INTLINE, 1); if (intr == 0 || intr == 255) { @@ -157,6 +158,7 @@ #endif return ENXIO; } +#endif cmd = pci_read_config(self, PCIR_COMMAND, 2); cmd |= PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MWRICEN; /\ 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 Mon Nov 4 20: 4:21 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 BB58237B401; Mon, 4 Nov 2002 20:03:53 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC3CD43E75; Mon, 4 Nov 2002 20:03:50 -0800 (PST) (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 gA543nKD041474; Mon, 4 Nov 2002 21:03:49 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id gA543m5w041473; Mon, 4 Nov 2002 21:03:48 -0700 (MST) (envelope-from ken) Date: Mon, 4 Nov 2002 21:03:48 -0700 From: "Kenneth D. Merry" To: Hidetoshi Shimokawa Cc: David Kleiner , Dmitry Mottl , freebsd-firewire@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Subject: Re: VAIO Firewire dock station with DVD-ROM Message-ID: <20021104210348.A41448@panzer.kdm.org> References: <20021025184837.C227-100000@localhost> <20021104073302.GA27648@panix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="h31gzZEtNLTqOjlF" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from simokawa@sat.t.u-tokyo.ac.jp on Tue, Nov 05, 2002 at 11:40:01AM +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 --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 05, 2002 at 11:40:01 +0900, Hidetoshi Shimokawa wrote: > At Mon, 4 Nov 2002 02:33:02 -0500, > David Kleiner wrote: > > > > Hidetoshi-san, > > > > I have just rebuilt my RELENG_4 world with just imported > > firewire support. > > > > Here is what I am getting when trying to run cdcontrol: > .. > > (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > > (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > > (cd0:sbp0:0:0:0): Invalid command operation code > > Could you try the CAM patch which Ken posted to the list? I've attached a -stable version of the patch. Keep in mind that this version has a bit of extra debugging output, so don't be alarmed if it is a bit more chatty than you expect. Ken -- Kenneth Merry ken@kdm.org --h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="scsi_cd.cmdsize.stable.200211102" ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.c#7 - /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.c ==== *** /tmp/tmp.6985.0 Sat Nov 2 18:52:39 2002 --- /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.c Sat Nov 2 18:35:15 2002 *************** *** 2568,2579 **** 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. */ --- 2568,2591 ---- 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. */ *************** *** 2621,2632 **** 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. */ --- 2633,2658 ---- 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-RELENG_4/src/sys/cam/scsi/scsi_all.h#2 - /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.h ==== *** /tmp/tmp.6985.1 Sat Nov 2 18:52:39 2002 --- /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.h Sat Nov 2 18:35:25 2002 *************** *** 833,838 **** --- 833,847 ---- 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 *), *************** *** 840,845 **** --- 849,862 ---- 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_read_capacity(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c#6 - /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c ==== *** /tmp/tmp.6985.2 Sat Nov 2 18:52:40 2002 --- /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c Sat Nov 2 18:50:33 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 *************** *** 136,141 **** --- 136,142 ---- struct cdchanger *changer; int bufs_left; struct cam_periph *periph; + 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); *************** *** 212,220 **** 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, --- 214,222 ---- 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, *************** *** 614,619 **** --- 616,623 ---- 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 *************** *** 1846,1854 **** { 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, --- 1850,1859 ---- { 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, *************** *** 1859,1866 **** 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) --- 1864,1875 ---- 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) *************** *** 1880,1888 **** { 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, --- 1889,1898 ---- { 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, *************** *** 1893,1900 **** 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) --- 1903,1914 ---- 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) *************** *** 1912,1923 **** { 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); --- 1926,1938 ---- { 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); *************** *** 1925,1932 **** 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) --- 1940,1951 ---- 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) *************** *** 2219,2242 **** 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); } --- 2238,2266 ---- 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); } *************** *** 2244,2411 **** 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); } --- 2268,2466 ---- 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); } *************** *** 2648,2661 **** --- 2703,2833 ---- } 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"); + /* XXX KDM remove this */ + printf("CAM Status %#x\n", ccb->ccb_h.status); + printf("SCSI Status %#x\n", ccb->csio.scsi_status); + scsi_sense_print(&ccb->csio); + + 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, *************** *** 2765,2800 **** } 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*/0, /*sense_flags*/SF_RETRY_UA|SF_RETRY_SELTO); --- 2937,2986 ---- } + /* + * 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*/0, /*sense_flags*/SF_RETRY_UA|SF_RETRY_SELTO); *************** *** 2804,2847 **** 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*/0, /*sense_flags*/SF_RETRY_UA | SF_RETRY_SELTO); --- 2990,3070 ---- 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*/0, /*sense_flags*/SF_RETRY_UA | SF_RETRY_SELTO); ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.h#1 - /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.h ==== *** /tmp/tmp.6985.3 Sat Nov 2 18:52:40 2002 --- /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.h Sat Oct 26 23:45:50 2002 *************** *** 679,689 **** --- 679,708 ---- }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 --h31gzZEtNLTqOjlF-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Mon Nov 4 22: 1:56 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 6BEB437B401; Mon, 4 Nov 2002 22:01:50 -0800 (PST) Received: from mail3.panix.com (mail3.panix.com [166.84.1.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 953BD43E42; Mon, 4 Nov 2002 22:01:49 -0800 (PST) (envelope-from kleiner@panix.com) Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mail3.panix.com (Postfix) with ESMTP id 7AC3D98816; Tue, 5 Nov 2002 01:01:43 -0500 (EST) Received: (from kleiner@localhost) by panix5.panix.com (8.11.6/8.8.8/PanixN1.0) id gA561hV25005; Tue, 5 Nov 2002 01:01:43 -0500 (EST) Date: Tue, 5 Nov 2002 01:01:43 -0500 From: David Kleiner To: "Kenneth D. Merry" Cc: Hidetoshi Shimokawa , Dmitry Mottl , freebsd-firewire@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Subject: Re: VAIO Firewire dock station with DVD-ROM Message-ID: <20021105060143.GA24764@panix.com> References: <20021025184837.C227-100000@localhost> <20021104073302.GA27648@panix.com> <20021104210348.A41448@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021104210348.A41448@panzer.kdm.org> User-Agent: Mutt/1.4i 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, Nov 04, 2002 at 09:03:48PM -0700, Kenneth D. Merry wrote: > On Tue, Nov 05, 2002 at 11:40:01 +0900, Hidetoshi Shimokawa wrote: > > At Mon, 4 Nov 2002 02:33:02 -0500, > > David Kleiner wrote: > > > > > > Hidetoshi-san, > > > > > > I have just rebuilt my RELENG_4 world with just imported > > > firewire support. > > > > > > Here is what I am getting when trying to run cdcontrol: > > .. > > > (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > > > (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > > > (cd0:sbp0:0:0:0): Invalid command operation code > > > > Could you try the CAM patch which Ken posted to the list? > > I've attached a -stable version of the patch. > > Keep in mind that this version has a bit of extra debugging output, so > don't be alarmed if it is a bit more chatty than you expect. > > Ken > -- > Kenneth Merry > ken@kdm.org Ken, I had applied your patch and rebuilt kernel - when I tried cdcontrol/cdplay, I got this streaming messages below (very chatty). CD didn't play, system eventually crashed, unfortunately, I don't have the dump. Thank you, David ======================================================================= error messages after cdcontrol ======================================================================= Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): Invalid command operation code Nov 4 21:42:50 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:000026084 Nov 4 21:42:50 mal /kernel: sbp0:0:0 Request aborted Nov 4 21:42:50 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 aa 00 0c 00, flags: 0x40, 6b cmd/32b data/32b sense Nov 4 21:42:50 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): MODE_SENSE(6)/MODE_SELECT(6) fail ed, increasing minimum CDB size to 10 bytes Nov 4 21:42:50 mal /kernel: CAM Status 0x8c Nov 4 21:42:50 mal /kernel: SCSI Status 0x2 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): Invalid command operation code Nov 4 21:42:50 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:0000261b8 Nov 4 21:42:50 mal /kernel: sbp0:0:0 Request aborted Nov 4 21:42:50 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 aa 00 0c 00, flags: 0x40, 6b cmd/32b data/32b sense Nov 4 21:42:50 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): MODE_SENSE(6)/MODE_SELECT(6) fail ed, increasing minimum CDB size to 10 bytes Nov 4 21:42:50 mal /kernel: CAM Status 0x8c Nov 4 21:42:50 mal /kernel: SCSI Status 0x2 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): Invalid command operation code Nov 4 21:42:50 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:0000262ec Nov 4 21:42:50 mal /kernel: sbp0:0:0 Request aborted Nov 4 21:42:50 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 aa 00 0c 00, flags: 0x40, 6b cmd/32b data/32b sense Nov 4 21:42:50 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): MODE_SENSE(6)/MODE_SELECT(6) fail ed, increasing minimum CDB size to 10 bytes Nov 4 21:42:50 mal /kernel: CAM Status 0x8c Nov 4 21:42:50 mal /kernel: SCSI Status 0x2 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 Nov 4 21:42:50 mal /kernel: (cd0:sbp0:0:0:0): Invalid command operation code Nov 4 21:42:50 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:000026420 ======================================================================= My boot messages: ======================================================================= Nov 4 21:46:47 mal /kernel: agp0: mem 0xf4000000-0xf407ffff,0xf8000000-0xfbffffff irq 3 at device 2.0 on pci0 Nov 4 21:46:47 mal /kernel: pcib1: at device 30.0 on pci0 Nov 4 21:46:47 mal /kernel: pci1: on pcib1 Nov 4 21:46:47 mal /kernel: fwohci0: mem 0xf41000 00-0xf4103fff,0xf4105000-0xf41057ff irq 3 at device 0.0 on pci1 Nov 4 21:46:47 mal /kernel: fwohci0: PCI bus latency was changing to 250. Nov 4 21:46:47 mal /kernel: cache size 8. Nov 4 21:46:47 mal /kernel: fwohci0: OHCI version 1.0 (ROM=1) Nov 4 21:46:47 mal /kernel: fwohci0: No. of Isochronous channel is 4. Nov 4 21:46:47 mal /kernel: fwohci0: resetting OHCI...done (0) Nov 4 21:46:47 mal /kernel: fwohci0: BUS_OPT 0xa002 -> 0xf800a002 Nov 4 21:46:47 mal /kernel: fwohci0: Link 1394a available S400, 2 ports, maxrec 2048 bytes. Nov 4 21:46:47 mal /kernel: fwohci0: Enable 1394a Enhancements Nov 4 21:46:47 mal /kernel: fwohci0: EUI64 08:00:46:03:00:c4:89:4d Nov 4 21:46:47 mal /kernel: fwochi_set_intr: 1 Nov 4 21:46:47 mal /kernel: firewire0: on fwohci0 Nov 4 21:46:47 mal /kernel: firewire0: firewire bus attach Nov 4 21:46:47 mal /kernel: sbp_identify Nov 4 21:46:47 mal /kernel: sbp_probe Nov 4 21:46:47 mal /kernel: sbp0: on firewire0 Nov 4 21:46:47 mal /kernel: sbp_attach Nov 4 21:46:47 mal /kernel: pcic0: irq 0 at device 2.0 on pci1 Nov 4 21:46:47 mal /kernel: pcic0: PCI Memory allocated: 0x88000000 Nov 4 21:46:47 mal /kernel: pcic0: Polling mode Nov 4 21:46:47 mal /kernel: pccard0: on pcic0 Nov 4 21:46:47 mal /kernel: fxp0: port 0x3000-0x303f m em 0xf4104000-0xf4104fff irq 9 at device 8.0 on pci1 Nov 4 21:46:47 mal /kernel: fxp0: Ethernet address 08:00:46:18:28:94 Nov 4 21:46:47 mal /kernel: inphy0: on miibus 0 Nov 4 21:46:47 mal /kernel: inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX -FDX, auto Nov 4 21:46:47 mal /kernel: isab0: at device 31.0 on pci0 Nov 4 21:46:47 mal /kernel: isa0: on isab0 Nov 4 21:46:47 mal /kernel: atapci0: port 0x1800 -0x180f at device 31.1 on pci0 Nov 4 21:46:47 mal /kernel: ata0: at 0x1f0 irq 14 on atapci0 Nov 4 21:46:47 mal /kernel: ata1: at 0x170 irq 15 on atapci0 Nov 4 21:46:47 mal /kernel: uhci0: 1 (loop=0) Nov 4 21:46:48 mal /kernel: send phy_config root_node=-1 gap_count=1 Nov 4 21:46:48 mal /kernel: start AT DMA status=0 Nov 4 21:46:48 mal /kernel: firewire0:Discover new S400 device ID:0800460300ca6 473 Nov 4 21:46:48 mal /kernel: bus_explore done Nov 4 21:46:48 mal /kernel: Device SBP-II Nov 4 21:46:48 mal /kernel: sbp_post_explore: EUI:0800460300ca6473 spec=1 key=1 . Nov 4 21:46:48 mal /kernel: sbp0:0:0 LOGIN Nov 4 21:46:48 mal /kernel: sbp0:0:0 ordered:1 type:5 EUI:0800460300ca6473 node :0 speed:2 maxrec:10 new! Nov 4 21:46:48 mal /kernel: sbp0:0:0 'Sony' 'PCGA-DSM5' 'ad1129' Nov 4 21:46:48 mal /kernel: sbp0:0:0 login: len 12, ID 0, cmd 0000fffff0010100, recon_hold 0 Nov 4 21:46:48 mal /kernel: sbp0:0:0 sbp_busy_timeout Nov 4 21:46:48 mal /kernel: sbp0:0:0 sbp_agent_reset Nov 4 21:46:48 mal /kernel: sbp0:0:0 sbp_do_attach Nov 4 21:46:48 mal /kernel: sbp0:0:0 sbp_cam_scan_lun Nov 4 21:46:48 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:0000243a4 Nov 4 21:46:48 mal /kernel: sbp0:0:0 Request aborted Nov 4 21:46:48 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 80 00 ff 00 00 00 00 00, flags: 0x40, 6b cmd/255b data/18b sense Nov 4 21:46:48 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 24 qlfr 0 len 7 Nov 4 21:46:48 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:0000244d8 Nov 4 21:46:48 mal /kernel: sbp0:0:0 Request aborted Nov 4 21:46:48 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense Nov 4 21:46:48 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 6 code 29 qlfr 0 len 7 Nov 4 21:46:48 mal /kernel: ad0: 14403MB [29264/16/63] at a ta0-master UDMA66 Nov 4 21:46:48 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:00002460c Nov 4 21:46:48 mal /kernel: sbp0:0:0 Request aborted Nov 4 21:46:48 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense Nov 4 21:46:48 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 Nov 4 21:46:48 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:000024740 Nov 4 21:46:48 mal /kernel: sbp0:0:0 Request aborted Nov 4 21:46:48 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense Nov 4 21:46:48 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 6 code 28 Nov 4 21:46:48 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 6 code 28 qlfr 0 len 7 Nov 4 21:46:48 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:000024c10 Nov 4 21:46:48 mal /kernel: sbp0:0:0 Request aborted Nov 4 21:46:48 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 12 01 80 00 ff 00 00 00 00 00, flags: 0x40, 6b cmd/255b data/18b sense Nov 4 21:46:48 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 24 qlfr 0 len 7 Nov 4 21:46:48 mal /kernel: (probe7:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 2 4 0 Nov 4 21:46:48 mal /kernel: (probe7:umass-sim0:0:0:0): NOT READY asc:3a,0 Nov 4 21:46:48 mal /kernel: (probe7:umass-sim0:0:0:0): Medium not present Nov 4 21:46:48 mal /kernel: Mounting root from ufs:/dev/ad0s2a Nov 4 21:46:48 mal /kernel: cd0 at sbp0 bus 0 target 0 lun 0 Nov 4 21:46:48 mal /kernel: cd0: Removable CD-ROM SCSI- 0 device Nov 4 21:46:48 mal /kernel: cd0: 50.000MB/s transfers Nov 4 21:46:48 mal /kernel: cd0: cd present [209755 x 2048 byte records] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Mon Nov 4 22:18: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 E2B9637B401; Mon, 4 Nov 2002 22:18:29 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28EF643E3B; Mon, 4 Nov 2002 22:18:27 -0800 (PST) (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 gA56IQKD042072; Mon, 4 Nov 2002 23:18:26 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id gA56IPDA042071; Mon, 4 Nov 2002 23:18:25 -0700 (MST) (envelope-from ken) Date: Mon, 4 Nov 2002 23:18:25 -0700 From: "Kenneth D. Merry" To: David Kleiner Cc: Hidetoshi Shimokawa , Dmitry Mottl , freebsd-firewire@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Subject: Re: VAIO Firewire dock station with DVD-ROM Message-ID: <20021104231825.A42046@panzer.kdm.org> References: <20021025184837.C227-100000@localhost> <20021104073302.GA27648@panix.com> <20021104210348.A41448@panzer.kdm.org> <20021105060143.GA24764@panix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021105060143.GA24764@panix.com>; from kleiner@panix.com on Tue, Nov 05, 2002 at 01:01:43AM -0500 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 --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 05, 2002 at 01:01:43 -0500, David Kleiner wrote: > On Mon, Nov 04, 2002 at 09:03:48PM -0700, Kenneth D. Merry wrote: > > On Tue, Nov 05, 2002 at 11:40:01 +0900, Hidetoshi Shimokawa wrote: > > > At Mon, 4 Nov 2002 02:33:02 -0500, > > > David Kleiner wrote: > > > > > > > > Hidetoshi-san, > > > > > > > > I have just rebuilt my RELENG_4 world with just imported > > > > firewire support. > > > > > > > > Here is what I am getting when trying to run cdcontrol: > > > .. > > > > (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > > > > (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > > > > (cd0:sbp0:0:0:0): Invalid command operation code > > > > > > Could you try the CAM patch which Ken posted to the list? > > > > I've attached a -stable version of the patch. > > > > Keep in mind that this version has a bit of extra debugging output, so > > don't be alarmed if it is a bit more chatty than you expect. > > > > Ken > > -- > > Kenneth Merry > > ken@kdm.org > > Ken, > > I had applied your patch and rebuilt kernel - when I tried > cdcontrol/cdplay, I got this streaming messages below (very > chatty). CD didn't play, system eventually crashed, unfortunately, > I don't have the dump. It looks like that's the result of a brain-o. I forgot to change the opcode. I've attached a new patch. It still has extra debugging output, in case something doesn't work right. Ken -- Kenneth Merry ken@kdm.org --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="scsi_cd.cmdsize.stable.20021104" ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.c#7 - /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.c ==== *** /tmp/tmp.2056.0 Mon Nov 4 23:16:22 2002 --- /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.c Sat Nov 2 18:35:15 2002 *************** *** 2568,2579 **** 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. */ --- 2568,2591 ---- 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. */ *************** *** 2621,2632 **** 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. */ --- 2633,2658 ---- 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-RELENG_4/src/sys/cam/scsi/scsi_all.h#2 - /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.h ==== *** /tmp/tmp.2056.1 Mon Nov 4 23:16:22 2002 --- /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_all.h Sat Nov 2 18:35:25 2002 *************** *** 833,838 **** --- 833,847 ---- 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 *), *************** *** 840,845 **** --- 849,862 ---- 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_read_capacity(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c#6 - /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c ==== *** /tmp/tmp.2056.2 Mon Nov 4 23:16:22 2002 --- /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.c Mon Nov 4 23:14:34 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 *************** *** 136,141 **** --- 136,142 ---- struct cdchanger *changer; int bufs_left; struct cam_periph *periph; + 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); *************** *** 212,220 **** 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, --- 214,222 ---- 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, *************** *** 614,619 **** --- 616,623 ---- 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 *************** *** 1846,1854 **** { 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, --- 1850,1859 ---- { 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, *************** *** 1859,1866 **** 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) --- 1864,1875 ---- 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) *************** *** 1880,1888 **** { 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, --- 1889,1898 ---- { 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, *************** *** 1893,1900 **** 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) --- 1903,1914 ---- 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) *************** *** 1912,1923 **** { 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); --- 1926,1938 ---- { 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); *************** *** 1925,1932 **** 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) --- 1940,1951 ---- 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) *************** *** 2219,2242 **** 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); } --- 2238,2266 ---- 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); } *************** *** 2244,2411 **** 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); } --- 2268,2466 ---- 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); } *************** *** 2648,2661 **** --- 2703,2834 ---- } 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"); + /* XXX KDM remove this */ + printf("CAM Status %#x\n", ccb->ccb_h.status); + printf("SCSI Status %#x\n", ccb->csio.scsi_status); + scsi_sense_print(&ccb->csio); + + 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)); + ms10.opcode = MODE_SENSE_10; + ms10.byte2 = ms6->byte2; + ms10.page = ms6->page; + + 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 = MODE_SELECT_10; + 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, *************** *** 2765,2800 **** } 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*/0, /*sense_flags*/SF_RETRY_UA|SF_RETRY_SELTO); --- 2938,2987 ---- } + /* + * 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*/0, /*sense_flags*/SF_RETRY_UA|SF_RETRY_SELTO); *************** *** 2804,2847 **** 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*/0, /*sense_flags*/SF_RETRY_UA | SF_RETRY_SELTO); --- 2991,3071 ---- 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*/0, /*sense_flags*/SF_RETRY_UA | SF_RETRY_SELTO); ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.h#1 - /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.h ==== *** /tmp/tmp.2056.3 Mon Nov 4 23:16:22 2002 --- /usr/home/ken/perforce2/FreeBSD-ken-RELENG_4/src/sys/cam/scsi/scsi_cd.h Sat Oct 26 23:45:50 2002 *************** *** 679,689 **** --- 679,708 ---- }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 --X1bOJ3K7DJ5YkBrT-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Nov 5 1: 0:44 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 273B937B401; Tue, 5 Nov 2002 01:00:40 -0800 (PST) Received: from mail1.panix.com (mail1.panix.com [166.84.1.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D06743E42; Tue, 5 Nov 2002 01:00:39 -0800 (PST) (envelope-from kleiner@panix.com) Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mail1.panix.com (Postfix) with ESMTP id 3B02F488CE; Tue, 5 Nov 2002 04:00:33 -0500 (EST) Received: (from kleiner@localhost) by panix5.panix.com (8.11.6/8.8.8/PanixN1.0) id gA590Xi29308; Tue, 5 Nov 2002 04:00:33 -0500 (EST) Date: Tue, 5 Nov 2002 04:00:33 -0500 From: David Kleiner To: "Kenneth D. Merry" Cc: Hidetoshi Shimokawa , Dmitry Mottl , freebsd-firewire@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Subject: Re: VAIO Firewire dock station with DVD-ROM Message-ID: <20021105090033.GA29210@panix.com> References: <20021025184837.C227-100000@localhost> <20021104073302.GA27648@panix.com> <20021104210348.A41448@panzer.kdm.org> <20021105060143.GA24764@panix.com> <20021104231825.A42046@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021104231825.A42046@panzer.kdm.org> User-Agent: Mutt/1.4i 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, Nov 04, 2002 at 11:18:25PM -0700, Kenneth D. Merry wrote: > On Tue, Nov 05, 2002 at 01:01:43 -0500, David Kleiner wrote: > > On Mon, Nov 04, 2002 at 09:03:48PM -0700, Kenneth D. Merry wrote: > > > On Tue, Nov 05, 2002 at 11:40:01 +0900, Hidetoshi Shimokawa wrote: > > > > At Mon, 4 Nov 2002 02:33:02 -0500, > > > > David Kleiner wrote: > > > > > > > > > > Hidetoshi-san, > > > > > > > > > > I have just rebuilt my RELENG_4 world with just imported > > > > > firewire support. > > > > > > > > > > Here is what I am getting when trying to run cdcontrol: > > > > .. > > > > > (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > > > > > (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > > > > > (cd0:sbp0:0:0:0): Invalid command operation code > > > > > > > > Could you try the CAM patch which Ken posted to the list? > > > > > > I've attached a -stable version of the patch. > > > > > > Keep in mind that this version has a bit of extra debugging output, so > > > don't be alarmed if it is a bit more chatty than you expect. > > > > > > Ken > > > -- > > > Kenneth Merry > > > ken@kdm.org > > > > Ken, > > > > I had applied your patch and rebuilt kernel - when I tried > > cdcontrol/cdplay, I got this streaming messages below (very > > chatty). CD didn't play, system eventually crashed, unfortunately, > > I don't have the dump. > > It looks like that's the result of a brain-o. I forgot to change the > opcode. > > I've attached a new patch. It still has extra debugging output, in case > something doesn't work right. > > Ken > -- > Kenneth Merry > ken@kdm.org Ken, Still doesn't :( I re-applied the patch, errors are not streaming to /var/log/messages! What I get when trying to do cdcontrol> status : Nov 5 00:05:37 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 Nov 5 00:05:38 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:0000244d8 Nov 5 00:05:38 mal /kernel: sbp0:0:0 Request aborted Nov 5 00:05:38 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense Nov 5 00:05:38 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 Nov 5 00:05:38 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:00002460c Nov 5 00:05:38 mal /kernel: sbp0:0:0 Request aborted Nov 5 00:05:38 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 00 00, flags: 0xc0, 6b cmd/0b data/32b sense Nov 5 00:05:38 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 qlfr 1 len 7 Nov 5 00:05:39 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: c orb:000024740 Nov 5 00:05:39 mal /kernel: sbp0:0:0 Request aborted At some point, the system crashed: panicstr: from debugger panic messages: --- Fatal trap 12: page fault while in kernel mode fault virtual address = 0x14 fault code = supervisor read, page not present instruction pointer = 0x8:0xc0274ef6 stack pointer = 0x10:0xd3c4bd40 frame pointer = 0x10:0xd3c4bd70 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 202 (xconsole) interrupt mask = tty sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:0000243a4 sbp0:0:0 Request aborted sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 00 00 18 00, flags: 0x40, 6b cmd/32b data/32b sense sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 Fatal trap 12: page fault while in kernel mode fault virtual address = 0x14 fault code = supervisor read, page not present instruction pointer = 0x8:0xc0274ef6 stack pointer = 0x10:0xd3c4bd40 frame pointer = 0x10:0xd3c4bd70 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 interrupt mask = tty panic: from debugger Fatal trap 3: breakpoint instruction fault while in kernel mode instruction pointer = 0x8:0xc0268df1 stack pointer = 0x10:0xd3c4bb54 frame pointer = 0x10:0xd3c4bb5c code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, IOPL = 0 current process = 202 (xconsole) interrupt mask = tty panic: from debugger Uptime: 18m40s dumping to dev #ad/0x30001, offset 659712 I have the dump (didn't write this out by heart :) - please let me know if I can give more information. Thank you very much, David To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Nov 5 4:49: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 14E8A37B401 for ; Tue, 5 Nov 2002 04:49:23 -0800 (PST) Received: from gate.soum.co.jp (gate.soum.co.jp [202.221.40.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43A3E43E77 for ; Tue, 5 Nov 2002 04:49:21 -0800 (PST) (envelope-from fujita@soum.co.jp) Received: from force.soum.co.jp (force.soum.co.jp [IPv6:3ffe:501:80a:1:a00:20ff:fef0:4c9c]) by gate.soum.co.jp (8.12.5/8.12.5) with ESMTP id gA5CnBWe034225; Tue, 5 Nov 2002 21:49:15 +0900 (JST) (envelope-from fujita@soum.co.jp) Received: from vanilla.soum.co.jp (vanilla.soum.co.jp [3ffe:501:80a:1:202:b3ff:fe98:8115]) by force.soum.co.jp (8.11.6/3.7W-2001122804) with ESMTP id gA5CnAF28816; Tue, 5 Nov 2002 21:49:10 +0900 (JST) Received: from localhost (localhost [::1]) by vanilla.soum.co.jp (Postfix) with ESMTP id D24415468; Tue, 5 Nov 2002 21:49:06 +0900 (JST) Date: Tue, 05 Nov 2002 21:49:06 +0900 (JST) Message-Id: <20021105.214906.112614026.fujita@soum.co.jp> To: simokawa@sat.t.u-tokyo.ac.jp Cc: firewire@FreeBSD.ORG Subject: Re: MFC? From: FUJITA Kazutoshi In-Reply-To: References: X-PGP-PublicKey: http://www.soum.co.jp/~fujita/fujita-GnuPG-publickey.txt X-PGP-FingerPrint: 9956 2ECE 7E7D B425 EC2D D49E FEBB 3C5F 2C34 1ECA Organization: SOUM Corporation, JAPAN X-URL: http://www.soum.co.jp/ X-Mailer: Mew version 2.2 on Emacs 21.2 / Mule 5.0 =?iso-2022-jp?B?KBskQjgtTFobKEIvU0FLQUtJKQ==?= Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 just a trivial thing. --- /sys/dev/firewire/fwohcireg.h Sun Nov 3 19:58:18 2002 +++ fwohcireg.h Tue Nov 5 21:37:48 2002 @@ -50,7 +50,7 @@ #define FW_DEVICE_TITSB43 0x8021 #define FW_DEVICE_CX3022 0x8039 #define FW_DEVICE_VT6306 0x3044 -#define FW_DEVICE_R5C552 0x1180 +#define FW_DEVICE_R5C552 0x0552 #define FW_DEVICE_PANGEA 0x0030 #define FW_DEVICE_UNINORTH 0x0031 #define FW_DEVICE_FW322 0x5811 Regards, To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Nov 5 13: 4:32 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 A4BE137B401 for ; Tue, 5 Nov 2002 13:04:31 -0800 (PST) Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9649743E6E for ; Tue, 5 Nov 2002 13:04:30 -0800 (PST) (envelope-from wkb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.12.6/8.12.6) with ESMTP id gA5L4SHX008269; Tue, 5 Nov 2002 22:04:29 +0100 (CET) (envelope-from wkb@freebie.xs4all.nl) Received: (from wkb@localhost) by freebie.xs4all.nl (8.12.6/8.12.6/Submit) id gA5L4RAf008268; Tue, 5 Nov 2002 22:04:27 +0100 (CET) Date: Tue, 5 Nov 2002 22:04:27 +0100 From: Wilko Bulte To: Hidetoshi Shimokawa Cc: freebsd-firewire@freebsd.org Subject: Re: fw driver refuses to attach on CPQ EVO N160 Message-ID: <20021105220427.A8231@freebie.xs4all.nl> References: <20021104093820.F26631@freebie.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from simokawa@sat.t.u-tokyo.ac.jp on Tue, Nov 05, 2002 at 11:57:20AM +0900 X-OS: FreeBSD 4.7-RC X-PGP: finger wilko@freebsd.org 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 Tue, Nov 05, 2002 at 11:57:20AM +0900, Hidetoshi Shimokawa wrote: > > The suggestion to switch off PNP does not work on this notebook as > > there is no BIOS option to do so. There are hardly any BIOS options > > anyway, this is an ACPI-heavy machine. > > > > Other suggestions? > > Could you try the following patch to see whether it works or not? Shimokawa-san, After applying that patch I got the following boot output: pcib2: at device 30.0 on pci0 pci2: on pcib2 pci2: (vendor=0x14f1, dev=0x2f00) at 4.0 XXXfw: vendid=104c, dev=8023 fwohci0: <1394 Open Host Controller Interface> mem 0xd0204000-0xd0207fff,0xd0201000-0xd02017ff at device 5.0 on pci2 fwohci0: PCI bus latency was changing to 250. cache size 8. pci_cfgintr_virgin: using routable interrupt 3 pci_cfgintr: ROUTE_INTERRUPT failed. fwohci0: Could not allocate irq device_probe_and_attach: fwohci0 attach returned 6 pcic0: irq 10 at device 6.0 on pci2 pcic0: PCI Memory allocated: 0x88000000 -- | / o / /_ _ wilko@FreeBSD.org |/|/ / / /( (_) Bulte Arnhem, the Netherlands To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Nov 5 13:13: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 81D3437B401 for ; Tue, 5 Nov 2002 13:13:10 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id D451143E3B for ; Tue, 5 Nov 2002 13:13:09 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id gA5LD2pk093854; Tue, 5 Nov 2002 14:13:02 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 05 Nov 2002 14:12:08 -0700 (MST) Message-Id: <20021105.141208.118795497.imp@bsdimp.com> To: wkb@freebie.xs4all.nl Cc: simokawa@sat.t.u-tokyo.ac.jp, freebsd-firewire@FreeBSD.ORG Subject: Re: fw driver refuses to attach on CPQ EVO N160 From: "M. Warner Losh" In-Reply-To: <20021105220427.A8231@freebie.xs4all.nl> References: <20021104093820.F26631@freebie.xs4all.nl> <20021105220427.A8231@freebie.xs4all.nl> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 In message: <20021105220427.A8231@freebie.xs4all.nl> Wilko Bulte writes: : fwohci0: <1394 Open Host Controller Interface> mem : 0xd0204000-0xd0207fff,0xd0201000-0xd02017ff at device 5.0 on pci2 : fwohci0: PCI bus latency was changing to 250. : cache size 8. : pci_cfgintr_virgin: using routable interrupt 3 : pci_cfgintr: ROUTE_INTERRUPT failed. If this is current, then maybe this is my fault. We're trying to route an interrupt, and it won't let us do IRQ3 for some reason. If this is stable, I'm not so sure, but it still might be my fault. What laptop? It has to be relatively modern given the 1410 that's in it. Does this problem happen with acpi? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Nov 5 13:20:44 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 5EB2737B401 for ; Tue, 5 Nov 2002 13:20:43 -0800 (PST) Received: from freebie.xs4all.nl (freebie.xs4all.nl [213.84.32.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D59C43E3B for ; Tue, 5 Nov 2002 13:20:42 -0800 (PST) (envelope-from wkb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.12.6/8.12.6) with ESMTP id gA5LKXHX008498; Tue, 5 Nov 2002 22:20:33 +0100 (CET) (envelope-from wkb@freebie.xs4all.nl) Received: (from wkb@localhost) by freebie.xs4all.nl (8.12.6/8.12.6/Submit) id gA5LKXKU008497; Tue, 5 Nov 2002 22:20:33 +0100 (CET) Date: Tue, 5 Nov 2002 22:20:33 +0100 From: Wilko Bulte To: "M. Warner Losh" Cc: simokawa@sat.t.u-tokyo.ac.jp, freebsd-firewire@FreeBSD.ORG Subject: Re: fw driver refuses to attach on CPQ EVO N160 Message-ID: <20021105222033.A8468@freebie.xs4all.nl> References: <20021104093820.F26631@freebie.xs4all.nl> <20021105220427.A8231@freebie.xs4all.nl> <20021105.141208.118795497.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20021105.141208.118795497.imp@bsdimp.com>; from imp@bsdimp.com on Tue, Nov 05, 2002 at 02:12:08PM -0700 X-OS: FreeBSD 4.7-RC X-PGP: finger wilko@freebsd.org 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 Tue, Nov 05, 2002 at 02:12:08PM -0700, M. Warner Losh wrote: > In message: <20021105220427.A8231@freebie.xs4all.nl> > Wilko Bulte writes: > : fwohci0: <1394 Open Host Controller Interface> mem > : 0xd0204000-0xd0207fff,0xd0201000-0xd02017ff at device 5.0 on pci2 > : fwohci0: PCI bus latency was changing to 250. > : cache size 8. > : pci_cfgintr_virgin: using routable interrupt 3 > : pci_cfgintr: ROUTE_INTERRUPT failed. > > If this is current, then maybe this is my fault. We're trying to This is -stable > route an interrupt, and it won't let us do IRQ3 for some reason. If > this is stable, I'm not so sure, but it still might be my fault. What > laptop? It has to be relatively modern given the 1410 that's in it. Compaq EVO N160 > Does this problem happen with acpi? Can't on -stable (see seperate thread on panics on the acpi for -stable) -- | / o / /_ _ wilko@FreeBSD.org |/|/ / / /( (_) Bulte Arnhem, the Netherlands To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Tue Nov 5 21: 9: 8 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 F280F37B401; Tue, 5 Nov 2002 21:09:04 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4F6643E75; Tue, 5 Nov 2002 21:09:03 -0800 (PST) (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 gA658vKD048318; Tue, 5 Nov 2002 22:08:58 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id gA658ulN048317; Tue, 5 Nov 2002 22:08:56 -0700 (MST) (envelope-from ken) Date: Tue, 5 Nov 2002 22:08:56 -0700 From: "Kenneth D. Merry" To: David Kleiner Cc: Hidetoshi Shimokawa , Dmitry Mottl , freebsd-firewire@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Subject: Re: VAIO Firewire dock station with DVD-ROM Message-ID: <20021105220856.A48288@panzer.kdm.org> References: <20021025184837.C227-100000@localhost> <20021104073302.GA27648@panix.com> <20021104210348.A41448@panzer.kdm.org> <20021105060143.GA24764@panix.com> <20021104231825.A42046@panzer.kdm.org> <20021105090033.GA29210@panix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021105090033.GA29210@panix.com>; from kleiner@panix.com on Tue, Nov 05, 2002 at 04:00:33AM -0500 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 Tue, Nov 05, 2002 at 04:00:33 -0500, David Kleiner wrote: > On Mon, Nov 04, 2002 at 11:18:25PM -0700, Kenneth D. Merry wrote: > > On Tue, Nov 05, 2002 at 01:01:43 -0500, David Kleiner wrote: > > > On Mon, Nov 04, 2002 at 09:03:48PM -0700, Kenneth D. Merry wrote: > > > > On Tue, Nov 05, 2002 at 11:40:01 +0900, Hidetoshi Shimokawa wrote: > > > > > At Mon, 4 Nov 2002 02:33:02 -0500, > > > > > David Kleiner wrote: > > > > > > > > > > > > Hidetoshi-san, > > > > > > > > > > > > I have just rebuilt my RELENG_4 world with just imported > > > > > > firewire support. > > > > > > > > > > > > Here is what I am getting when trying to run cdcontrol: > > > > > .. > > > > > > (cd0:sbp0:0:0:0): MODE SENSE(06). CDB: 1a 0 e 0 1c 0 > > > > > > (cd0:sbp0:0:0:0): ILLEGAL REQUEST asc:20,0 > > > > > > (cd0:sbp0:0:0:0): Invalid command operation code > > > > > > > > > > Could you try the CAM patch which Ken posted to the list? > > > > > > > > I've attached a -stable version of the patch. > > > > > > > > Keep in mind that this version has a bit of extra debugging output, so > > > > don't be alarmed if it is a bit more chatty than you expect. > > > > > > > > Ken > > > > -- > > > > Kenneth Merry > > > > ken@kdm.org > > > > > > Ken, > > > > > > I had applied your patch and rebuilt kernel - when I tried > > > cdcontrol/cdplay, I got this streaming messages below (very > > > chatty). CD didn't play, system eventually crashed, unfortunately, > > > I don't have the dump. > > > > It looks like that's the result of a brain-o. I forgot to change the > > opcode. > > > > I've attached a new patch. It still has extra debugging output, in case > > something doesn't work right. > > > > Ken > > -- > > Kenneth Merry > > ken@kdm.org > > Ken, > > Still doesn't :( I re-applied the patch, errors are not streaming to > /var/log/messages! > > What I get when trying to do > > cdcontrol> status : > > Nov 5 00:05:37 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 > qlfr 1 len 7 > Nov 5 00:05:38 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: > c orb:0000244d8 > Nov 5 00:05:38 mal /kernel: sbp0:0:0 Request aborted > Nov 5 00:05:38 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 > 00 00, flags: 0xc0, 6b cmd/0b data/32b sense > Nov 5 00:05:38 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 > qlfr 1 len 7 > Nov 5 00:05:38 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: > c orb:00002460c > Nov 5 00:05:38 mal /kernel: sbp0:0:0 Request aborted > Nov 5 00:05:38 mal /kernel: sbp0:0:0 XPT_SCSI_IO: cmd: 00 00 00 00 00 00 00 00 > 00 00, flags: 0xc0, 6b cmd/0b data/32b sense > Nov 5 00:05:38 mal /kernel: sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 2 code 4 > qlfr 1 len 7 > Nov 5 00:05:39 mal /kernel: sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat: > c orb:000024740 > Nov 5 00:05:39 mal /kernel: sbp0:0:0 Request aborted If the mode sense/mode select handling code triggered, you should be seeing the "MODE_SENSE(6)/MODE_SELECT(6) failed, increasing minimum CDB size to 10 bytes" printf... > At some point, the system crashed: > > panicstr: from debugger > panic messages: So you broke into the debugger and paniced the system? That panic message is what happens when you type 'panic' from the ddb prompt. > --- > Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x14 > fault code = supervisor read, page not present > instruction pointer = 0x8:0xc0274ef6 > stack pointer = 0x10:0xd3c4bd40 > frame pointer = 0x10:0xd3c4bd70 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 202 (xconsole) > interrupt mask = tty > sbp0:0:0 ORB status src:1 resp:0 dead:0 len:7 stat:c orb:0000243a4 > sbp0:0:0 Request aborted > sbp0:0:0 XPT_SCSI_IO: cmd: 1a 00 0e 00 1c 00 00 00 18 00, flags: 0x40, 6b cmd/32b data/32b sense > sbp0:0:0 SCSI status 2 sfmt 0 valid 0 key 5 code 20 qlfr 0 len 7 > > > Fatal trap 12: page fault while in kernel mode > fault virtual address = 0x14 > fault code = supervisor read, page not present > instruction pointer = 0x8:0xc0274ef6 > stack pointer = 0x10:0xd3c4bd40 > frame pointer = 0x10:0xd3c4bd70 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > interrupt mask = tty > panic: from debugger > > > Fatal trap 3: breakpoint instruction fault while in kernel mode > instruction pointer = 0x8:0xc0268df1 Breakpoint instruction? Did you set a breakpoint? > stack pointer = 0x10:0xd3c4bb54 > frame pointer = 0x10:0xd3c4bb5c > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, IOPL = 0 > current process = 202 (xconsole) > interrupt mask = tty > panic: from debugger > Uptime: 18m40s > > dumping to dev #ad/0x30001, offset 659712 > > I have the dump (didn't write this out by heart :) - please let me know > if I can give more information. Well, if the system really is panicing somewhere, it would be good to get a stack trace. If you hook up a serial console, you can get it from ddb. You can also get a stack trace from the crash dump if you do something like: gdb -k kernel.debug vmcore.0 where 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 Wed Nov 6 7:39:42 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 D961C37B401 for ; Wed, 6 Nov 2002 07:39:41 -0800 (PST) Received: from mx3.cape.com (mx3.cape.com [204.107.252.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E60FC43E97 for ; Wed, 6 Nov 2002 07:39:40 -0800 (PST) (envelope-from crtb@cape.com) Received: from tomato (tsc-24.cape.com [140.186.55.24]) by mx3.cape.com (8.12.3/8.12.3) with ESMTP id gA6FdXRr015377; Wed, 6 Nov 2002 10:39:34 -0500 Date: Wed, 6 Nov 2002 10:39:30 -0500 (EST) From: Charles Bacon X-X-Sender: crtb@tomato.crtb.net To: FreeBSD-Firewire@freebsd.org Cc: Charles Bacon Subject: Firewire info? Message-ID: <20021106103643.L9774-100000@tomato.crtb.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Cape.Com VirusScan, no known virus found 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 Not subscribed to freebsd-firewire; pls respond directly. No evidence of existence of firewire (ilink, i1394) support in 4.5-RELEASE; just mention of this list. Any chance of it in future FreeBSD? Chuck Bacon -- crtb@cape.com ABHOR SECRECY -- DEFEND PRIVACY To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Wed Nov 6 9:15:37 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 30FE437B410 for ; Wed, 6 Nov 2002 09:15:36 -0800 (PST) Received: from office.advantage-interactive.com (host217-37-74-237.in-addr.btopenworld.com [217.37.74.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC7E243E3B for ; Wed, 6 Nov 2002 09:15:29 -0800 (PST) (envelope-from simond@irrelevant.org) Received: from devbox.advantage-interactive.com ([192.168.254.128] helo=linux.advantage-interactive.com) by office.advantage-interactive.com with esmtp (Exim 3.36 #1) id 189Tlp-0000FB-00; Wed, 06 Nov 2002 17:15:13 +0000 Subject: Re: Firewire info? From: Simon Dick To: Charles Bacon Cc: FreeBSD-Firewire@freebsd.org In-Reply-To: <20021106103643.L9774-100000@tomato.crtb.net> References: <20021106103643.L9774-100000@tomato.crtb.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2 Date: 06 Nov 2002 17:15:12 +0000 Message-Id: <1036602913.1483.23.camel@linux> Mime-Version: 1.0 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, 2002-11-06 at 15:39, Charles Bacon wrote: > Not subscribed to freebsd-firewire; pls respond directly. > No evidence of existence of firewire (ilink, i1394) support > in 4.5-RELEASE; just mention of this list. > Any chance of it in future FreeBSD? Almost certainly in 4.8 and 5.0, it was introduced into the -STABLE branch very recently and after 4.7 was released. -- Simon Dick simond@irrelevant.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Wed Nov 6 9:30: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 ABD6137B401 for ; Wed, 6 Nov 2002 09:30:18 -0800 (PST) Received: from proxy.centtech.com (moat.centtech.com [207.200.51.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 897B143E6E for ; Wed, 6 Nov 2002 09:30:17 -0800 (PST) (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 gA6HUCs02975; Wed, 6 Nov 2002 11:30:12 -0600 (CST) Received: (from root@localhost) by sprint.centtech.com (8.11.6+Sun/8.11.6) id gA6HUBQ23234; Wed, 6 Nov 2002 11:30:11 -0600 (CST) Received: from centtech.com (electron [204.177.173.173]) by -i (8.11.6+Sun/8.11.6) with ESMTP id gA6HU8u23215; Wed, 6 Nov 2002 11:30:08 -0600 (CST) Message-ID: <3DC95199.3060006@centtech.com> Date: Wed, 06 Nov 2002 11:30:01 -0600 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: Simon Dick Cc: Charles Bacon , FreeBSD-Firewire@freebsd.org Subject: Re: Firewire info? References: <20021106103643.L9774-100000@tomato.crtb.net> <1036602913.1483.23.camel@linux> 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 Well, since this well now be part of the standard installation (in 5.0 and 4.8 I mean), we should publicize this a little.. I'm involved with the FreeBSD-advocacy stuff, and I'm looking for tidbits of information that we can use to write up articles, or press releases on this. Should help build up "hype" for 5.0 (and 4.8 of course). Anyone have some good bits I can start gathering? How about some of the developers? Here are some simple questions to start with: What does the firewire stuff work with? How does a FreeBSD user get it to work? Cool features? Eric Simon Dick wrote: > On Wed, 2002-11-06 at 15:39, Charles Bacon wrote: > >>Not subscribed to freebsd-firewire; pls respond directly. >>No evidence of existence of firewire (ilink, i1394) support >>in 4.5-RELEASE; just mention of this list. >>Any chance of it in future FreeBSD? > > > Almost certainly in 4.8 and 5.0, it was introduced into the -STABLE > branch very recently and after 4.7 was released. > -- ------------------------------------------------------------------ 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 Wed Nov 6 9:48:39 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 D8B0E37B4C9 for ; Wed, 6 Nov 2002 09:48:36 -0800 (PST) Received: from msgbas1.cos.agilent.com (msgbas1x.cos.agilent.com [192.25.240.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1150743E42 for ; Wed, 6 Nov 2002 09:48:36 -0800 (PST) (envelope-from darrylo@soco.agilent.com) Received: from relcos2.cos.agilent.com (relcos2.cos.agilent.com [130.29.152.237]) by msgbas1.cos.agilent.com (Postfix) with ESMTP id A144D7C59; Wed, 6 Nov 2002 10:48:30 -0700 (MST) Received: from mina.soco.agilent.com (mina.soco.agilent.com [141.121.54.157]) by relcos2.cos.agilent.com (Postfix) with ESMTP id 267433B7; Wed, 6 Nov 2002 10:48:30 -0700 (MST) Received: from mina.soco.agilent.com (darrylo@localhost [127.0.0.1]) by mina.soco.agilent.com (8.9.3 (PHNE_25184)/8.9.3 SMKit7.1.1_Agilent) with ESMTP id JAA12077; Wed, 6 Nov 2002 09:48:29 -0800 (PST) Message-Id: <200211061748.JAA12077@mina.soco.agilent.com> To: Eric Anderson Cc: FreeBSD-Firewire@FreeBSD.ORG Subject: Re: Firewire info? Reply-To: Darryl Okahata In-Reply-To: Your message of "Wed, 06 Nov 2002 11:30:01 CST." <3DC95199.3060006@centtech.com> Mime-Version: 1.0 (generated by tm-edit 1.7) Content-Type: text/plain; charset=US-ASCII Date: Wed, 06 Nov 2002 09:48:28 -0800 From: Darryl Okahata 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 Eric Anderson wrote: > Here are some simple questions to start with: How about: "Which firewire interface cards are supported?" If firewire is really as good as it sounds, people will want to know which cards work, and which don't. [ I've been following this list, and I haven't seem much mention of desktop interface cards -- most of the talk seems to be about laptop interfaces. Do desktop cards work, and if so, which ones? I'm sure people would want to know, for example, if the Adaptec card works (I don't know, but I'd be willing to bet, "no", given Adaptec's propensity for nondisclosure). ] -- Darryl Okahata darrylo@soco.agilent.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion, or policy of Agilent Technologies, or of the little green men that have been following him all day. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Wed Nov 6 10: 0:15 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 1BD7F37B401 for ; Wed, 6 Nov 2002 10:00:14 -0800 (PST) Received: from InterJet.elischer.org (12-232-206-8.client.attbi.com [12.232.206.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1438043E3B for ; Wed, 6 Nov 2002 10:00:13 -0800 (PST) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id JAA01103; Wed, 6 Nov 2002 09:48:37 -0800 (PST) Date: Wed, 6 Nov 2002 09:48:36 -0800 (PST) From: Julian Elischer To: Charles Bacon Cc: FreeBSD-Firewire@freebsd.org Subject: Re: Firewire info? In-Reply-To: <20021106103643.L9774-100000@tomato.crtb.net> 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 firewire is in 5.0 and will be in 4.8 it missed 4.7 by a week or two. it can be backported to 4.5 very easily by simply copying the /sys/dev/firewire directory into your kernel sources and also teh config file changes.. (/sys/conf/files, etc.) On Wed, 6 Nov 2002, Charles Bacon wrote: > Not subscribed to freebsd-firewire; pls respond directly. > No evidence of existence of firewire (ilink, i1394) support > in 4.5-RELEASE; just mention of this list. > Any chance of it in future FreeBSD? > > Chuck Bacon -- crtb@cape.com > ABHOR SECRECY -- DEFEND PRIVACY > > > 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 Wed Nov 6 10: 0:22 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 3513537B401 for ; Wed, 6 Nov 2002 10:00:21 -0800 (PST) Received: from InterJet.elischer.org (12-232-206-8.client.attbi.com [12.232.206.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D1E443E3B for ; Wed, 6 Nov 2002 10:00:20 -0800 (PST) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id JAA01127; Wed, 6 Nov 2002 09:54:37 -0800 (PST) Date: Wed, 6 Nov 2002 09:54:37 -0800 (PST) From: Julian Elischer To: Darryl Okahata Cc: Eric Anderson , FreeBSD-Firewire@FreeBSD.ORG Subject: Re: Firewire info? In-Reply-To: <200211061748.JAA12077@mina.soco.agilent.com> 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 Wed, 6 Nov 2002, Darryl Okahata wrote: > Eric Anderson wrote: > > > Here are some simple questions to start with: > > How about: "Which firewire interface cards are supported?" > > If firewire is really as good as it sounds, people will want to > know which cards work, and which don't. > > [ I've been following this list, and I haven't seem much mention of > desktop interface cards -- most of the talk seems to be about laptop > interfaces. Do desktop cards work, and if so, which ones? I'm sure > people would want to know, for example, if the Adaptec card works (I > don't know, but I'd be willing to bet, "no", given Adaptec's > propensity for nondisclosure). ] Almost any card that follows the ohci interface will work as the standard specifies what the hardware interface looks like.. I use the indigita ohci card, but there is a linux page that lists a hundred or so cards that use that interface. Usually they use one of several chipsets that implement the OHCI interface.. mine uses a lucent chipset. In addition there are several from TI and all the other usual suspects.. > > -- > Darryl Okahata > darrylo@soco.agilent.com > > DISCLAIMER: this message is the author's personal opinion and does not > constitute the support, opinion, or policy of Agilent Technologies, or > of the little green men that have been following him all day. > > > 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 Wed Nov 6 11:17: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 CCA9437B401 for ; Wed, 6 Nov 2002 11:17:56 -0800 (PST) Received: from msgbas1.cos.agilent.com (msgbas1x.cos.agilent.com [192.25.240.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56E8243E75 for ; Wed, 6 Nov 2002 11:17:56 -0800 (PST) (envelope-from darrylo@soco.agilent.com) Received: from relcos1.cos.agilent.com (relcos1.cos.agilent.com [130.29.152.239]) by msgbas1.cos.agilent.com (Postfix) with ESMTP id 070C79E1A; Wed, 6 Nov 2002 12:17:56 -0700 (MST) Received: from mina.soco.agilent.com (mina.soco.agilent.com [141.121.54.157]) by relcos1.cos.agilent.com (Postfix) with ESMTP id 7D6D85A9; Wed, 6 Nov 2002 12:17:55 -0700 (MST) Received: from mina.soco.agilent.com (darrylo@localhost [127.0.0.1]) by mina.soco.agilent.com (8.9.3 (PHNE_25184)/8.9.3 SMKit7.1.1_Agilent) with ESMTP id LAA29297; Wed, 6 Nov 2002 11:17:54 -0800 (PST) Message-Id: <200211061917.LAA29297@mina.soco.agilent.com> To: Julian Elischer Cc: Eric Anderson , FreeBSD-Firewire@FreeBSD.ORG Subject: Re: Firewire info? Reply-To: Darryl Okahata In-Reply-To: Your message of "Wed, 06 Nov 2002 09:54:37 PST." Mime-Version: 1.0 (generated by tm-edit 1.7) Content-Type: text/plain; charset=US-ASCII Date: Wed, 06 Nov 2002 11:17:53 -0800 From: Darryl Okahata 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 Julian Elischer wrote: > Almost any card that follows the ohci interface will work as the > standard specifies what the hardware interface looks like.. > I use the indigita ohci card, but there is a linux page that lists > a hundred or so cards that use that interface. > Usually they use one of several chipsets that implement the OHCI > interface.. > mine uses a lucent chipset. In addition there are several from TI and > all the other usual suspects.. OK, thanks. Something to this effect should go into the handbook, then. It's an obvious question, and isn't one that I've seen documented anywhere. -- Darryl Okahata darrylo@soco.agilent.com DISCLAIMER: this message is the author's personal opinion and does not constitute the support, opinion, or policy of Agilent Technologies, or of the little green men that have been following him all day. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Wed Nov 6 11:24:40 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 9AE2637B401 for ; Wed, 6 Nov 2002 11:24:39 -0800 (PST) Received: from proxy.centtech.com (moat.centtech.com [207.200.51.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06A6943E42 for ; Wed, 6 Nov 2002 11:24:32 -0800 (PST) (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 gA6JOLs06199; Wed, 6 Nov 2002 13:24:21 -0600 (CST) Received: (from root@localhost) by sprint.centtech.com (8.11.6+Sun/8.11.6) id gA6JOLg02009; Wed, 6 Nov 2002 13:24:21 -0600 (CST) Received: from centtech.com (electron [204.177.173.173]) by -i (8.11.6+Sun/8.11.6) with ESMTP id gA6JOHu01997; Wed, 6 Nov 2002 13:24:17 -0600 (CST) Message-ID: <3DC96C5B.2000601@centtech.com> Date: Wed, 06 Nov 2002 13:24:11 -0600 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: Darryl Okahata Cc: Julian Elischer , FreeBSD-Firewire@freebsd.org Subject: Re: Firewire info? References: <200211061917.LAA29297@mina.soco.agilent.com> 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 Darryl Okahata wrote: > OK, thanks. Something to this effect should go into the handbook, > then. It's an obvious question, and isn't one that I've seen documented > anywhere. > Actually, I don't think any firewire stuff is documented anywhere in the handbook yet. I was considering writing up a chapter on it, if I could gather enough info. 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 Wed Nov 6 16:32: 8 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 64AF937B401 for ; Wed, 6 Nov 2002 16:32:07 -0800 (PST) Received: from mail.freebsdmall.com (ns1.freebsdmall.com [66.220.2.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AB9743E77 for ; Wed, 6 Nov 2002 16:32:07 -0800 (PST) (envelope-from murray@freebsdmall.com) Received: by mail.freebsdmall.com (Postfix, from userid 2074) id 62F1A2E8B7; Wed, 6 Nov 2002 16:32:06 -0800 (PST) Date: Wed, 6 Nov 2002 16:32:06 -0800 From: Murray Stokely To: Eric Anderson Cc: Darryl Okahata , Julian Elischer , FreeBSD-Firewire@freebsd.org Subject: Re: Firewire info? Message-ID: <20021106163206.B75495@freebsdmall.com> References: <200211061917.LAA29297@mina.soco.agilent.com> <3DC96C5B.2000601@centtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3DC96C5B.2000601@centtech.com>; from anderson@centtech.com on Wed, Nov 06, 2002 at 01:24:11PM -0600 X-GPG-Key-ID: 1024D/0E451F7D X-GPG-Key-Fingerprint: E2CA 411D DD44 53FD BB4B 3CB5 B4D7 10A2 0E45 1F7D 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, Nov 06, 2002 at 01:24:11PM -0600, Eric Anderson wrote: > Actually, I don't think any firewire stuff is documented anywhere in the > handbook yet. I was considering writing up a chapter on it, if I could > gather enough info. Yes please do, it is desperately needed. The fine folks on doc@ can help if you gather the information. - Murray To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message From owner-freebsd-firewire Wed Nov 6 17:49: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 8297037B401 for ; Wed, 6 Nov 2002 17:49:10 -0800 (PST) Received: from ns.koganei.wide.ad.jp (koganei.wide.ad.jp [202.249.37.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1729D43E3B for ; Wed, 6 Nov 2002 17:49:08 -0800 (PST) (envelope-from ikob@koganei.wide.ad.jp) Received: from koganei.wide.ad.jp (tweedledee.koganei.wide.ad.jp [202.249.37.72]) (authenticated bits=0) by ns.koganei.wide.ad.jp (8.12.3/8.12.3) with ESMTP id gA71qYUQ060283; Thu, 7 Nov 2002 10:52:34 +0900 (JST) (envelope-from ikob@koganei.wide.ad.jp) X-Authentication-Warning: ns.koganei.wide.ad.jp: Host tweedledee.koganei.wide.ad.jp [202.249.37.72] claimed to be koganei.wide.ad.jp Date: Thu, 7 Nov 2002 10:51:20 +0900 Subject: Re: Firewire info? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v546) Cc: Darryl Okahata , Eric Anderson , FreeBSD-Firewire@FreeBSD.ORG To: Julian Elischer From: Katsushi Kobayashi In-Reply-To: Message-Id: <69C86662-F1F3-11D6-80CB-0030657D3460@koganei.wide.ad.jp> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.546) 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 Also, the supported device in current version is - Storage device and other SCSI on firewire device using CAM. Although, many kind of firewire devices, disk, scanner, VCR, video camera, still camera, keyboard and etc. are released, we don't have enough developing power due to only two engines being there, one is shimokawa-san and another is me. Later engine is sometimes stalled. Anyway, if you would like take the firewire related information, please refer fwohci(4) and sbp(4) for the supported chipset and the information for SCSI over firewire, respectively. We are sorry if the information is not sync'd the latest code. On 2002.Nov.7, at 02:54 AM, Julian Elischer wrote: > > > On Wed, 6 Nov 2002, Darryl Okahata wrote: > >> Eric Anderson wrote: >> >>> Here are some simple questions to start with: >> >> How about: "Which firewire interface cards are supported?" >> >> If firewire is really as good as it sounds, people will want to >> know which cards work, and which don't. >> >> [ I've been following this list, and I haven't seem much mention of >> desktop interface cards -- most of the talk seems to be about laptop >> interfaces. Do desktop cards work, and if so, which ones? I'm sure >> people would want to know, for example, if the Adaptec card works (I >> don't know, but I'd be willing to bet, "no", given Adaptec's >> propensity for nondisclosure). ] > > Almost any card that follows the ohci interface will work as the > standard specifies what the hardware interface looks like.. > I use the indigita ohci card, but there is a linux page that lists > a hundred or so cards that use that interface. > Usually they use one of several chipsets that implement the OHCI > interface.. > mine uses a lucent chipset. In addition there are several from TI and > all the other usual suspects.. > > > >> >> -- >> Darryl Okahata >> darrylo@soco.agilent.com >> >> DISCLAIMER: this message is the author's personal opinion and does not >> constitute the support, opinion, or policy of Agilent Technologies, or >> of the little green men that have been following him all day. >> >> >> 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-firewire" in the body of the message