From owner-freebsd-scsi Sun Nov 3 23:33:14 2002 Delivered-To: freebsd-scsi@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-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Mon Nov 4 11: 2:15 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8314D37B404 for ; Mon, 4 Nov 2002 11:02:14 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B0D643E4A for ; Mon, 4 Nov 2002 11:02:14 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gA4J2Ex3039486 for ; Mon, 4 Nov 2002 11:02:14 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gA4J2Dm8039462 for scsi@freebsd.org; Mon, 4 Nov 2002 11:02:13 -0800 (PST) Date: Mon, 4 Nov 2002 11:02:13 -0800 (PST) Message-Id: <200211041902.gA4J2Dm8039462@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: scsi@FreeBSD.org Subject: Current problem reports assigned to you Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [2002/02/18] kern/35082 scsi IBM Intellistation will not reboot with S 1 problem total. Serious problems Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [1999/12/21] kern/15608 scsi acd0 / cd0 give inconsistent errors on em 1 problem total. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Mon Nov 4 18:40:11 2002 Delivered-To: freebsd-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Mon Nov 4 20: 4:21 2002 Delivered-To: freebsd-scsi@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-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Mon Nov 4 22: 1:56 2002 Delivered-To: freebsd-scsi@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-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Mon Nov 4 22:18:58 2002 Delivered-To: freebsd-scsi@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-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Tue Nov 5 1: 0:43 2002 Delivered-To: freebsd-scsi@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-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Tue Nov 5 3:18:47 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42B1C37B401 for ; Tue, 5 Nov 2002 03:18:45 -0800 (PST) Received: from pegasus.freiberg-net.de (pegasus.freiberg-net.de [80.243.43.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09BBC43E42 for ; Tue, 5 Nov 2002 03:18:44 -0800 (PST) (envelope-from holm@pegasus.freiberg-net.de) Received: from pegasus.freiberg-net.de (localhost.freiberg-net.de [127.0.0.1]) by pegasus.freiberg-net.de (8.12.6/8.12.2) with ESMTP id gA5BHx51002509 for ; Tue, 5 Nov 2002 12:17:59 +0100 (CET) (envelope-from holm@pegasus.freiberg-net.de) Received: (from holm@localhost) by pegasus.freiberg-net.de (8.12.6/8.12.6/Submit) id gA5BHxQX002508 for freebsd-scsi@freebsd.org; Tue, 5 Nov 2002 12:17:59 +0100 (CET) Date: Tue, 5 Nov 2002 12:17:59 +0100 From: Holm Tiffe To: freebsd-scsi@freebsd.org Subject: problms with USB Olympus Cam Message-ID: <20021105121759.A1362@pegasus.freiberg-net.de> Reply-To: holm@freibergnet.de Mail-Followup-To: Holm Tiffe , freebsd-scsi@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i Organization: FreibergNet Internet Services X-Phone: +49-3731-781279 X-Fax: +49-3731-781377 X-PGP-fingerprint: 86 EC A5 63 B5 28 78 13 8B FC E9 09 04 6E 86 FC Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, I have an Olympus E-10 Digital Camera here and wish to read it on -current (cvsupped 2 hours ago). I got the following: umass0: OLYMPUS E-10, rev 1.10/1.30, addr 2 umass0: Residue incorrect, was 0, should've been 219 umass0: Residue incorrect, was 0, should've been 219 umass0: Residue incorrect, was 0, should've been 219 umass0: Residue incorrect, was 0, should've been 219 umass0: Residue incorrect, was 0, should've been 219 umass0: Residue incorrect, was 0, should've been 14 cam_periph_alloc: attempt to re-allocate valid device da2 rejected daasync: Unable to attach to new device due to status 0x6 ( /dev/da2 doesn't get removed after detaching umass0) sk /dev/da2 fdisk: can't open device /dev/da2 fdisk: cannot open disk /dev/da2: Input/output error # fdisk /dev/da2 fdisk: can't get disk parameters on /dev/da2; supplying dummy ones ******* Working on device /dev/da2 ******* parameters extracted from in-core disklabel are: cylinders=256000 heads=1 sectors/track=1 (1 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=256000 heads=1 sectors/track=1 (1 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 6 (0x06),(Primary 'big' DOS (>= 32MB)) start 47, size 255953 (124 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 16; end: cyl 499/ head 15/ sector 32 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: ... but there is no /dev/da2s1. I can read the raw data out of the cam, but I can't mount it. What can I do to get a /dev/da2s1 ? Holm -- FreibergNet Systemhaus GbR Holm Tiffe * Administration, Development Systemhaus für Daten- und Netzwerktechnik phone +49 3731 781279 Unternehmensgruppe Liebscher & Partner fax +49 3731 781377 D-09599 Freiberg * Am St. Niclas Schacht 13 http://www.freibergnet.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Nov 5 4:24:41 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09FFA37B401 for ; Tue, 5 Nov 2002 04:24:40 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FA3943E42 for ; Tue, 5 Nov 2002 04:24:35 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with ESMTP id gA5COORK080600 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 5 Nov 2002 14:24:24 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Submit) id gA5CONt2080595 for scsi@FreeBSD.org; Tue, 5 Nov 2002 14:24:23 +0200 (EET) Date: Tue, 5 Nov 2002 14:24:23 +0200 From: Ruslan Ermilov To: scsi@FreeBSD.org Subject: ``mt erase 0'' on a non-rewinded tape Message-ID: <20021105122423.GA79188@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi there! I have a script that does automated file system backups using mt(1) and dump(8). My tape drive is: sa0: Removable Sequential Access SCSI-2 device) When doing a level 0 backup, the script does a quick erase of the tape, then does the retension, then does the backup. When doing an incremental backup, it seeks to the end of recorded medium, then does the backup. The script works with the no-rewind device, /dev/nsa0. The script always used to fail with EINVAL attempting to run a quick erase, ``mt erase 0''. After a bit of experimenting, it turned out that `erase' only works if I rewind the tape (either through by using the rewind device, or by running the `rewind' or `retension' commands in advance). Here is my question. Is this always the case that MTERASE only works with a rewinded tape, or is this device-dependent? If the former, what would be an appropriate way to document it? (I am reluctant to find myself where this EINVAL is coming from, and there is a plenty of them under sys/cam/.) Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE9x7h3Ukv4P6juNwoRAhHqAJ94w8Bz9GgJAfksGOsCagcYfwZYzwCdFHKf KYRdEhPLPYL90pI2DI5l4VA= =l1kQ -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Nov 5 9:19:42 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7382C37B401 for ; Tue, 5 Nov 2002 09:19:41 -0800 (PST) Received: from boromir.vpop.net (dns1.vpop.net [207.178.248.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 313D443E6E for ; Tue, 5 Nov 2002 09:19:41 -0800 (PST) (envelope-from mreimer@vpop.net) Received: from vpop.net (bilbo.vpop.net [65.103.33.41]) by boromir.vpop.net (Postfix) with ESMTP id 0ABEC3A5E36 for ; Tue, 5 Nov 2002 09:17:43 -0800 (PST) Message-ID: <3DC7FD69.8010609@vpop.net> Date: Tue, 05 Nov 2002 11:18:33 -0600 From: Matthew Reimer Organization: VPOP Technologies, Inc. User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2b) Gecko/20021023 X-Accept-Language: en-us, en MIME-Version: 1.0 To: scsi@freebsd.org Subject: asr and raidutil: Engine connect failed: Open Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org We just installed an Adaptec 2110S (couldn't get a 2120S in time) on a machine running a -stable kernel from around Sep 10. We're having a problem with raidutil (from ADPTFBSD_31C.TGZ on the CD): it works fine for a while, and then it won't work anymore, returning this error: # /usr/dpt/raidutil -L all Engine connect failed: Open The device node /dev/rdpti0 does exist: crw------- 1 root wheel 154, 0 Nov 3 00:07 /dev/rdpti0 Neither fstat or lsof show that /dev/rdpti0 is open. Does anyone have any ideas on how to fix this without rebooting? Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Nov 5 11:20:14 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81A2837B477; Tue, 5 Nov 2002 11:20:09 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC67743E6E; Tue, 5 Nov 2002 11:20:06 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.9.3/8.9.3) with UUCP id UAA01499; Tue, 5 Nov 2002 20:20:04 +0100 (CET) Received: from uriah.heep.sax.de (localhost.heep.sax.de [127.0.0.1]) by uriah.heep.sax.de (8.12.5/8.12.5) with ESMTP id gA5JIqWc014095; Tue, 5 Nov 2002 20:18:52 +0100 (MET) (envelope-from j@uriah.heep.sax.de) Received: (from j@localhost) by uriah.heep.sax.de (8.12.5/8.12.5/Submit) id gA5JIqaY014094; Tue, 5 Nov 2002 20:18:52 +0100 (MET) (envelope-from j) Date: Tue, 5 Nov 2002 20:18:52 +0100 (MET) Message-Id: <200211051918.gA5JIqaY014094@uriah.heep.sax.de> Mime-Version: 1.0 X-Newsreader: knews 1.0b.1 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Organization: Private BSD site, Dresden X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E References: <20021105122423.GA79188@sunbay.com> From: j@uriah.heep.sax.de (Joerg Wunsch) Subject: Re: ``mt erase 0'' on a non-rewinded tape X-Original-Newsgroups: local.freebsd.scsi To: freebsd-scsi@freebsd.org Cc: Ruslan Ermilov Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Ruslan Ermilov wrote: > The script always used to fail with EINVAL attempting to run a > quick erase, ``mt erase 0''. After a bit of experimenting, it > turned out that `erase' only works if I rewind the tape (either > through by using the rewind device, or by running the `rewind' > or `retension' commands in advance). Please read the SCSI command description for your drive. Depending on the media type, the ERASE command will only be accepted at either beginning of medium, or at the beginning of partition for a partitioned medium. AFAICT, the FreeBSD driver doesn't support partitions anyway, so in effect, the drive will only accept the command at BOM. Apart from that, i don't understand your reasoning for the erase command. Since the quick erase is a logical erase command only anyway, the effect is the same like starting to write from BOT, for any practical purpose. Whether you use the rewind or non-rewind device should make no difference, as long as the tape itself is at BOM. "non-rewind" actually means "do not rewind upon close of the device", while the state at open time is always the state the device has been left over by the last operation. It's always good practice to keep the medium at BOM while the tape is not in use, since after all, that's the only position you can rely of. Otherwise, if a SCSI bus reset hit while your script was idle, the drive will rewind the tape, and next time your script is run it might make an invalid assumption about the actual tape position, thus perhaps accidentally overwriting something. OK, you wrote that you're using a "mt eom" before trying to append, so you're already safe there, but then there's no reason to not rewind the medium when finishing the script. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Tue Nov 5 21: 9: 8 2002 Delivered-To: freebsd-scsi@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-scsi@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-scsi" in the body of the message From owner-freebsd-scsi Wed Nov 6 1:22:36 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C6C837B401 for ; Wed, 6 Nov 2002 01:22:34 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C6E543E7B for ; Wed, 6 Nov 2002 01:22:30 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with ESMTP id gA69MNRK096351 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 6 Nov 2002 11:22:23 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Submit) id gA69MNlP096346; Wed, 6 Nov 2002 11:22:23 +0200 (EET) Date: Wed, 6 Nov 2002 11:22:23 +0200 From: Ruslan Ermilov To: Joerg Wunsch Cc: freebsd-scsi@freebsd.org Subject: Re: ``mt erase 0'' on a non-rewinded tape Message-ID: <20021106092223.GB93420@sunbay.com> References: <20021105122423.GA79188@sunbay.com> <200211051918.gA5JIqaY014094@uriah.heep.sax.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <200211051918.gA5JIqaY014094@uriah.heep.sax.de> User-Agent: Mutt/1.4i Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 05, 2002 at 08:18:52PM +0100, Joerg Wunsch wrote: > Ruslan Ermilov wrote: >=20 > > The script always used to fail with EINVAL attempting to run a > > quick erase, ``mt erase 0''. After a bit of experimenting, it > > turned out that `erase' only works if I rewind the tape (either > > through by using the rewind device, or by running the `rewind' > > or `retension' commands in advance). >=20 > Please read the SCSI command description for your drive. Depending on > the media type, the ERASE command will only be accepted at either > beginning of medium, or at the beginning of partition for a > partitioned medium. AFAICT, the FreeBSD driver doesn't support > partitions anyway, so in effect, the drive will only accept the > command at BOM. >=20 OK, thanks for the explanation! > Apart from that, i don't understand your reasoning for the erase > command. Since the quick erase is a logical erase command only > anyway, the effect is the same like starting to write from BOT, for > any practical purpose. >=20 My tapes always look like this: level 0 backups at Friday's evening, level 1 backups on Monday, ..., level 4 backups on Thursday. If I don't erase the tape when I do a level 0 backup, won't there be a chance that when I later do an incremental backup and do an "mt eom" it will find some stale file markers left by old incremental backups? > Whether you use the rewind or non-rewind device should make no > difference, as long as the tape itself is at BOM. "non-rewind" > actually means "do not rewind upon close of the device", while the > state at open time is always the state the device has been left over > by the last operation. >=20 I wasn't clear enough. I meant it worked if I always used the rewind device. In this case, "mt erase" was always run at the BOM. > It's always good practice to keep the medium at BOM while the tape is > not in use, since after all, that's the only position you can rely of. > Otherwise, if a SCSI bus reset hit while your script was idle, the > drive will rewind the tape, and next time your script is run it might > make an invalid assumption about the actual tape position, thus > perhaps accidentally overwriting something. OK, you wrote that you're > using a "mt eom" before trying to append, so you're already safe > there, but then there's no reason to not rewind the medium when > finishing the script. >=20 Yes, the script runs "mt eom" for that very reason. But why would I rewind the tape if the next day I want to use it from this same position? IOW, if the SCSI bus isn't reset in-between, I get: # /usr/bin/time mt eom 0,01 real 0,00 user 0,00 sys (I change the tapes once a week, at Friday's evening.) Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE9yN9PUkv4P6juNwoRAhSRAJwL8ZIAFLXJb+jNwPHPmAEvkeo5JwCfYDbF 4FKNdX457wTgtGwI5nbrm8s= =tWQp -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Nov 6 2: 0:15 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CA7B37B401; Wed, 6 Nov 2002 02:00:13 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15A8F43E97; Wed, 6 Nov 2002 02:00:11 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.9.3/8.9.3) with UUCP id LAA09839; Wed, 6 Nov 2002 11:00:04 +0100 (CET) Received: from uriah.heep.sax.de (localhost.heep.sax.de [127.0.0.1]) by uriah.heep.sax.de (8.12.5/8.12.5) with ESMTP id gA69wBWc033147; Wed, 6 Nov 2002 10:58:11 +0100 (MET) (envelope-from j@uriah.heep.sax.de) Received: (from j@localhost) by uriah.heep.sax.de (8.12.5/8.12.5/Submit) id gA69wBiW033146; Wed, 6 Nov 2002 10:58:11 +0100 (MET) (envelope-from j) Date: Wed, 6 Nov 2002 10:58:11 +0100 From: Joerg Wunsch To: Ruslan Ermilov Cc: freebsd-scsi@freebsd.org Subject: Re: ``mt erase 0'' on a non-rewinded tape Message-ID: <20021106105811.A31642@uriah.heep.sax.de> Reply-To: Joerg Wunsch Mail-Followup-To: Joerg Wunsch , Ruslan Ermilov , freebsd-scsi@freebsd.org References: <20021105122423.GA79188@sunbay.com> <200211051918.gA5JIqaY014094@uriah.heep.sax.de> <20021106092223.GB93420@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20021106092223.GB93420@sunbay.com>; from ru@freebsd.org on Wed, Nov 06, 2002 at 11:22:23AM +0200 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org As Ruslan Ermilov wrote: > level 0 backups at Friday's evening, level 1 backups on Monday, ..., > level 4 backups on Thursday. If I don't erase the tape when I do a > level 0 backup, won't there be a chance that when I later do an > incremental backup and do an "mt eom" it will find some stale file > markers left by old incremental backups? Nope. When you start writing from the beginning of the medium, it'll always set a new EOM. You can't access the old contents behind EOM (at least not using the normal SCSI interface -- the only known method is to poweroff the drive after writing behind the previous EOM, or to hand off your medium to the NSA ;-). That's not half-inch reel-to-reel tapes anymore :), they are the only drives that needed two file marks in order to mark the logical end of tape, since you could still position behind it, and continue reading. Well, we still write two filemarks anyway, but other than compatibility with prehistoric software, there's no practical reason for this since the drives/media of all modern drives have their own notion of EOM anyway. > I wasn't clear enough. I meant it worked if I always used the rewind > device. In this case, "mt erase" was always run at the BOM. If the tape is at BOM, the command is supposed to work regardless of whether you use /dev/sa0 or /dev/nsa0. If it doesn't, that should be debugged. > Yes, the script runs "mt eom" for that very reason. But why would I > rewind the tape if the next day I want to use it from this same > position? IOW, if the SCSI bus isn't reset in-between, I get: > > # /usr/bin/time mt eom > 0,01 real 0,00 user 0,00 sys OK, saving a minute of positioning time might be an argument. :) -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Nov 6 16:26:45 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 675F037B401 for ; Wed, 6 Nov 2002 16:26:43 -0800 (PST) Received: from smtp2.america.net (smtp2.america.net [199.170.121.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id B887543E42 for ; Wed, 6 Nov 2002 16:26:41 -0800 (PST) (envelope-from stkkifan.vilcans@ortivus.se) Received: from dial.cylink.com.cy ([65.173.141.107]) by smtp2.america.net (8.11.6/8.11.6) with ESMTP id gA70V1x23287; Wed, 6 Nov 2002 19:31:02 -0500 (EST) Message-ID: <0000073a3987$000062b6$00007390@mail.pi.se> To: Cc: , , , , , , , , , , , , , , , , From: "Samantha Blake" Subject: The fever is getting hot6972 Date: Wed, 06 Nov 2002 16:26:24 -2000 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org If your interested in putting your product or service in front of millions of prospective clients or buyers READ ON! What is the most cost effective form of advertising for the very small all the way up to the largest of companies? Commercial Email! Why? Because there is no charge for paper, printing, mailing or the unbelievabley HIGH COST of putting Ads into Magazines or Papers. Why should most of your advertising dollar go for overhead? There IS a BETTER way! How? By placing your ad directly into the e-mail boxes of consumers who, like you, have an Internet e-mail address. Almost every user of the Internet has a unique e-mail address and we can effectively reach as many of those people as you want FAST and EFFECTIVELY. Every year the number of users increases tremendously creating a huge market. Why not become part of this unlimited market by placing your personal ad in one of the largest consumer databases? We are interested in doing business with you, however, we DO NOT do pornography or schemes of any kind. Please call us with your legitimate product or service. Some of you may not be interested at all, and possibly are agitated by our message. We will respectfully remove you from our list by request. We are responsible commercial e-mailers and don't want to bother those who are not interested. We not only respect you, but also our customers. We do not want our customers spending their advertising dollars on prospects that do not have any interest. (Decline instructions are at the end of this letter.) Below you will find basic mailing options we are offering at this time. Check out our SPECIALS! Commercial Email Gets Results! Untargeted mailings: 1,000,000 E-mails for U.S $500.00 2,000,000 E-mails for U.S $900.00 3,000,000 E-mails for U.S $1200.00 4,000,000 E-mails for U.S $1400.00 For Professional Advertising Campaigns at Affordable Prices Call 818-743-7507 By utilizing our resources and technology we have achieved our goal of making advertising affordable and effective on the Internet. We hope that you will choose our company to help you in attaining your companies goals. This message is an advertisement. We will continue to bring you valuable permission based messages on the products and services that interest you most unless you wish to decline. If you no longer wish to receive our messages send a e-mail to: mailto:mxrly@yahoo.com?subject=expunge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Wed Nov 6 18: 1:42 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B0BE37B404 for ; Wed, 6 Nov 2002 18:01:41 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 1F00443E6E for ; Wed, 6 Nov 2002 18:01:41 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 16892 invoked by uid 1000); 7 Nov 2002 02:01:42 -0000 Date: Wed, 6 Nov 2002 18:01:42 -0800 (PST) From: Nate Lawson To: current@freebsd.org, scsi@freebsd.org Subject: Updated targ(4) - need testers Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I have updated the new scsi_target driver and fixed a bug in -current that now allows it to work as well as the -stable version. I haven't gotten any feedback so I would love it if someone could download this and test it. All comments welcome, even about the included manpages. All you need to test it are a PC and a dual bus (or two single bus) ahc(4) or isp(4) card(s). Versions for -stable and -current at: http://www.root.org/~nate/freebsd/ -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sat Nov 9 0:48:27 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20B7037B401 for ; Sat, 9 Nov 2002 00:48:26 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 708AD43E42 for ; Sat, 9 Nov 2002 00:48:24 -0800 (PST) (envelope-from andreas@klemm.apsfilter.org) Received: from srv1.cosmo-project.de (localhost [IPv6:::1]) by srv1.cosmo-project.de (8.12.5/8.12.5) with ESMTP id gA98mMsP038792 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 9 Nov 2002 09:48:23 +0100 (CET) (envelope-from andreas@klemm.apsfilter.org) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.12.5/8.12.5/Submit) with UUCP id gA98mLjx038791 for freebsd-scsi@freebsd.org; Sat, 9 Nov 2002 09:48:22 +0100 (CET) (envelope-from andreas@klemm.apsfilter.org) Received: from titan.klemm.apsfilter.org (localhost.klemm.apsfilter.org [127.0.0.1]) by klemm.apsfilter.org (8.12.6/8.12.6) with ESMTP id gA98lwmB007758 for ; Sat, 9 Nov 2002 09:48:03 +0100 (CET) (envelope-from andreas@titan.klemm.apsfilter.org) Received: (from andreas@localhost) by titan.klemm.apsfilter.org (8.12.6/8.12.6/Submit) id gA98lvU5007757 for freebsd-scsi@freebsd.org; Sat, 9 Nov 2002 09:47:57 +0100 (CET) Date: Sat, 9 Nov 2002 09:47:57 +0100 From: Andreas Klemm To: freebsd-scsi@freebsd.org Subject: not too expensive intelligent hardware raid controller (level 0,1,5) Message-ID: <20021109084757.GA7723@titan.klemm.apsfilter.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 4.7-STABLE SMP X-Disclaimer: A free society is one where it is safe to be unpopular User-Agent: Mutt/1.5.1i Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi dear freebsd fellows, I converted a collegue of mine, who works for the same customer as I to FreeBSD ;-) Now he is keep to play around a little with RAID functionality under FreeBSD. As far as I remember FreeBSD is still unable to boot from a Vinum RAID level 5 array for example ... So if he wants to run all from a RAID level 5 array he needs a separate intelligent RAID controller. He wants to buy this controller and disks used from eBay not to spend too much money. What do you think are rlatively inexpensive RAID controllers, that are worth to have look at it ... Used he doesn't want to spend more then $ 100 for a controller, I already told him -> no way, but I wanted to know if you have an idea whats currently the most inexpensive RAID controller so that he possibly gets one used for about this price .... Thanks for your kind support Andreas /// -- Andreas Klemm /\/\/\/\/\/\/\/\/\/\/\ http://www.64bits.de < Powered by FreeBSD > http://www.apsfilter.org/ \ www.FreeBSD.org / http://people.FreeBSD.ORG/~andreas \/\/\/\/\/\/\/\/\/\/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sat Nov 9 12:29:53 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1ED9F37B401; Sat, 9 Nov 2002 12:29:51 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F20C43E6E; Sat, 9 Nov 2002 12:29: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 gA9KTiKD076301; Sat, 9 Nov 2002 13:29:44 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id gA9KThx6076300; Sat, 9 Nov 2002 13:29:43 -0700 (MST) (envelope-from ken) Date: Sat, 9 Nov 2002 13:29:43 -0700 From: "Kenneth D. Merry" To: Andreas Klemm Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: not too expensive intelligent hardware raid controller (level 0,1,5) Message-ID: <20021109132943.A76219@panzer.kdm.org> References: <20021109084757.GA7723@titan.klemm.apsfilter.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021109084757.GA7723@titan.klemm.apsfilter.org>; from andreas@FreeBSD.ORG on Sat, Nov 09, 2002 at 09:47:57AM +0100 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, Nov 09, 2002 at 09:47:57 +0100, Andreas Klemm wrote: > Hi dear freebsd fellows, > > I converted a collegue of mine, who works for the same customer > as I to FreeBSD ;-) > > Now he is keep to play around a little with RAID functionality > under FreeBSD. As far as I remember FreeBSD is still unable > to boot from a Vinum RAID level 5 array for example ... > > So if he wants to run all from a RAID level 5 array he needs > a separate intelligent RAID controller. > > He wants to buy this controller and disks used from eBay not > to spend too much money. > > What do you think are rlatively inexpensive RAID controllers, > that are worth to have look at it ... > > Used he doesn't want to spend more then $ 100 for a controller, > I already told him -> no way, but I wanted to know if you have > an idea whats currently the most inexpensive RAID controller > so that he possibly gets one used for about this price .... You might be able to find an Adaptec AAC-364, which was also sold as the Dell PERC2/QC. It is a 4 channel Ultra2 RAID controller with (I believe) a battery backed cache, and I think it also has a hardware parity engine for RAID-5 parity calculations. It is supported by the aac(4) driver. It looks like one just sold for $42.55: http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=2068336397 Although there are a number of other auctions with higher bids for the same model card. Keep in mind that you need newer than version 1.x firmware on these boards, as the aac(4) man page states: "This driver is not compatible with controllers that have version 1.x firmware. The firmware version is the same as the kernel version printed in the BIOS POST and driver attach messages." I believe there may be firmware available online, at least for the Dell cards, but Scott Long would probably know a little more about it. A better, faster, controller would be the HP NetRAID 4M, which is a quad channel Ultra160 RAID controller, with a battery backed cache and a hardware parity engine. The same card is sold as the Adaptec 5400S. (The NetRAID 4M has been on the market for a couple of years, so you're more likely to find them on eBay than the 5400S.) It isn't likely you'll find the NetRAID 4M (or the 5400S) for under $100, though. (Not unless the seller has a horrible feedback rating or something.) Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sat Nov 9 19:59: 7 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F97037B404 for ; Sat, 9 Nov 2002 19:59:06 -0800 (PST) Received: from postal.netaxs.com (postal.netaxs.com [207.8.186.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2E4343E4A for ; Sat, 9 Nov 2002 19:59:05 -0800 (PST) (envelope-from clear@alum.mit.edu) Received: from alum.mit.edu (root@unix5.netaxs.com [207.8.186.7]) by postal.netaxs.com (8.12.0.Beta7/8.12.0.Beta7) with ESMTP id gAA3x4Qm027799 for ; Sat, 9 Nov 2002 22:59:04 -0500 (EST) Message-ID: <3DCDD987.337479DF@alum.mit.edu> Date: Sat, 09 Nov 2002 22:59:03 -0500 From: Jed Clear Organization: Dis X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en,pdf MIME-Version: 1.0 To: freebsd-scsi@freebsd.org Subject: nca (NCR5380) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Did the nca driver ever get ported to CAM? I've got a UMAX 1220S Scanner with the UDS-IS11 (DTC-3181) SCSI controller that I'd like to get working under 4.7. Thanks, -Jed To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message From owner-freebsd-scsi Sat Nov 9 21: 3:33 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BE2437B401 for ; Sat, 9 Nov 2002 21:03:32 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 198E343E75 for ; Sat, 9 Nov 2002 21:03:31 -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 gAA53SKD078599; Sat, 9 Nov 2002 22:03:29 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id gAA53SrN078598; Sat, 9 Nov 2002 22:03:28 -0700 (MST) (envelope-from ken) Date: Sat, 9 Nov 2002 22:03:28 -0700 From: "Kenneth D. Merry" To: Jed Clear Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: nca (NCR5380) Message-ID: <20021109220328.A78584@panzer.kdm.org> References: <3DCDD987.337479DF@alum.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3DCDD987.337479DF@alum.mit.edu>; from clear@alum.mit.edu on Sat, Nov 09, 2002 at 10:59:03PM -0500 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, Nov 09, 2002 at 22:59:03 -0500, Jed Clear wrote: > Did the nca driver ever get ported to CAM? > > I've got a UMAX 1220S Scanner with the UDS-IS11 (DTC-3181) SCSI > controller that I'd like to get working under 4.7. It wasn't ported. There is a driver for the NCR 53c500 (ncv), no idea how similar that is to the 5380 or 53c400, though. Feel free to port the driver if you like. :) Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message