From owner-freebsd-hardware Mon Mar 10 2:28:21 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1C6F37B404 for ; Mon, 10 Mar 2003 02:28:19 -0800 (PST) Received: from etustar.ze.tu-muenchen.de (etustar.ze.tu-muenchen.de [129.187.39.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FDB543F93 for ; Mon, 10 Mar 2003 02:28:18 -0800 (PST) (envelope-from estartu@etustar.ze.tu-muenchen.de) Received: from etustar.ze.tu-muenchen.de (localhost.ze.tu-muenchen.de [127.0.0.1]) by etustar.ze.tu-muenchen.de (8.12.8/8.12.8) with ESMTP id h2AASE0Q038539; Mon, 10 Mar 2003 11:28:14 +0100 (CET) (envelope-from estartu@etustar.ze.tu-muenchen.de) Received: (from estartu@localhost) by etustar.ze.tu-muenchen.de (8.12.8/8.12.6/Submit) id h2AASE1q038538; Mon, 10 Mar 2003 11:28:14 +0100 (CET) (envelope-from estartu) Date: Mon, 10 Mar 2003 11:28:14 +0100 From: Gerhard Schmidt To: freebsd-hardware@FreeBSD.ORG Subject: MODE_SENCE_BIG Message-ID: <20030310102814.GA38391@augusta.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi,=20 I Just installed a new Computer with FreeBSD.=20 I've tried to install FreeBSD 4.7.=20 acd0: MODE_SENSE_BIG command timeout - resetting ata1: resetting devices .. done [... Repearts 20 Times ...] acd0: CDROM at ata1-master PIO4 The DVD-Rom is not useable. I have tried to install FreeBSD 4.5 from CD=20 and suceeded. Aber updateing via cvsup to stable and make world I have the same Problem again.=20 Is This Problem known. Is There a Fix for this.=20 MfG=20 Gerhard Schmidt ---------------------------------------------------------------------------- Gerhard Schmidt =20 schmidt@ze.tu-muenchen.de=20 --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use MessageID: x8VwWuWmR18r9vhIv4YbWLYID5wz/7VK iQCVAwUBPmxovQzx22nOTJQRAQESYQP+JSjtb3efCGkoKumJ5y/OqFFbFLI02Rkl 1677KEwkeOxaLtR5kwBTE2Hj//3mx9O6Fb3nE0mfUL3lAZIVgjhsN1tpDD2rZQ2X GHKKyxHBtxSQA7q97KuH+oQTuCY+eNJ/8Rz/bvzAp6VaLXHKRRF7SC0JLAuD4tvT e7Fc4E+5s14= =6+vH -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Mon Mar 10 13:21:24 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5D5837B405 for ; Mon, 10 Mar 2003 13:21:22 -0800 (PST) Received: from haggis.it.ca (haggis.it.ca [216.126.86.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAC7843F93 for ; Mon, 10 Mar 2003 13:21:21 -0800 (PST) (envelope-from paul@haggis.it.ca) Received: from haggis.it.ca (paul@localhost [127.0.0.1]) by haggis.it.ca (8.12.6/8.12.6) with ESMTP id h2ALL21O028573 for ; Mon, 10 Mar 2003 16:21:03 -0500 (EST) (envelope-from paul@haggis.it.ca) Received: (from paul@localhost) by haggis.it.ca (8.12.6/8.12.6/Submit) id h2ALL2r4028557 for freebsd-hardware@FreeBSD.ORG; Mon, 10 Mar 2003 16:21:02 -0500 (EST) (envelope-from paul) Date: Mon, 10 Mar 2003 16:21:02 -0500 From: Paul Chvostek To: freebsd-hardware@FreeBSD.ORG Subject: X-10 / xtend : what serial port for /dev/tw0 ? Message-ID: <20030310162102.A26034@mail.it.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hiya. I've got a TW-523 plugged in to cuaa0. I've added tw0 to the kernel, and I can run /usr/libexec/xtend, but I can't figure out how to tell the system what serial port on which the tw0 device can find the hardware. Running xtend and issuing the command `xten A AllLightsOn` logs: Mon Mar 10 16:08:28 2003: /usr/libexec/xtend [665] started Mon Mar 10 16:08:28 2003: /dev/tw0 successfully opened Mon Mar 10 16:09:27 2003: Accepting user connection Mon Mar 10 16:09:27 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:27 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:28 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:28 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:28 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:29 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:29 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:29 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:30 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:30 2003: Transmission error (packet [A AllLightsOn]:2). Mon Mar 10 16:09:30 2003: Closing user connection Any thoughts? Thanks. :) -- Paul Chvostek Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Mon Mar 10 15:25: 6 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3CF837B401 for ; Mon, 10 Mar 2003 15:25:03 -0800 (PST) Received: from haggis.it.ca (haggis.it.ca [216.126.86.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id D62F343F3F for ; Mon, 10 Mar 2003 15:25:02 -0800 (PST) (envelope-from paul@haggis.it.ca) Received: from haggis.it.ca (paul@localhost [127.0.0.1]) by haggis.it.ca (8.12.6/8.12.6) with ESMTP id h2ANOp1O069126; Mon, 10 Mar 2003 18:24:51 -0500 (EST) (envelope-from paul@haggis.it.ca) Received: (from paul@localhost) by haggis.it.ca (8.12.6/8.12.6/Submit) id h2ANOpos069125; Mon, 10 Mar 2003 18:24:51 -0500 (EST) (envelope-from paul) Date: Mon, 10 Mar 2003 18:24:51 -0500 From: Paul Chvostek To: freebsd-hardware@FreeBSD.ORG Subject: Re: X-10 / xtend : what serial port for /dev/tw0 ? Message-ID: <20030310182451.A60587@mail.it.ca> References: <20030310162102.A26034@mail.it.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20030310162102.A26034@mail.it.ca>; from paul@it.ca on Mon, Mar 10, 2003 at 04:21:02PM -0500 Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I've received some wisdom in response to my original post, and have done some additional research. I now know that the TW523 normally talks to a parallel port, and my use of the serial port was probably wrong.... But to be clear on this, my problem is with the device that sits between the RJ12 and the PC. The TW523 is in the wall socket, and the RJ12 cable connects the TW523 to this blue port adapter that is DB25 *female* (same gender as tha parallel port on the PC). A straight-through DB25 gender changer does *not* make things work, and if you're following this, I'm sure you're wondering just what this blue adapter is. So was I, so I took it apart. The inside is glopped together with hard plastic, so I can't take it fully apart without breaking it ... but from what I can see, there's a small circuit board with resistors, diodes and at least one capacitor on it. Pins 2 and 3 on the DB25 are in fact shorted together with solder, and pins 4, 5, 6, and 19 connect to the circuit board. So whatever this is, it wants to talk to a serial port. The unit has no label or brand identifier, and except for the fancy plastic goo and professional-quality circuit board, it appears to have been assembled from generic parts. The printer circuit embedded inside has no visible screen printing, and when plugged into a serial port through a serial tester, I get lights (as I would expect) on TD, RD, RTS and DTR. With pins 2 and 3 shorted, the unit acts as a serial loopback, so I'm assuming it would communicate with the TW523 using RTS and DTR. It obviously won't work with FreeBSD's built-in tw driver, but has anyone ever heard of something like this? Am I dealing with someone's custom electronics project, or was this thing ever a "product"? Perhaps a kit? Any advice would be greatly appreciated. :-) On Mon, Mar 10, 2003 at 04:21:02PM -0500, Paul Chvostek wrote: > > Hiya. > > I've got a TW-523 plugged in to cuaa0. I've added tw0 to the kernel, > and I can run /usr/libexec/xtend, but I can't figure out how to tell the > system what serial port on which the tw0 device can find the hardware. > > Running xtend and issuing the command `xten A AllLightsOn` logs: > > Mon Mar 10 16:08:28 2003: /usr/libexec/xtend [665] started > Mon Mar 10 16:08:28 2003: /dev/tw0 successfully opened > Mon Mar 10 16:09:27 2003: Accepting user connection > Mon Mar 10 16:09:27 2003: Transmission error (packet [A AllLightsOn]:2). ... > Mon Mar 10 16:09:30 2003: Closing user connection -- Paul Chvostek Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Tue Mar 11 7:22:11 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F06737B401 for ; Tue, 11 Mar 2003 07:22:10 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5313143FB1 for ; Tue, 11 Mar 2003 07:22:09 -0800 (PST) (envelope-from ticso@cicely9.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.8/8.12.8) with ESMTP id h2BFLf7T029179 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 11 Mar 2003 16:21:54 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (cicely9.cicely.de [IPv6:3ffe:400:8d0:301:210:5aff:fe30:1c1a]) by cicely5.cicely.de (8.12.8/8.12.8) with ESMTP id h2BFLdX1011173 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Mar 2003 16:21:40 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (localhost [127.0.0.1]) by cicely9.cicely.de (8.12.8/8.12.8) with ESMTP id h2BFLckv074163; Tue, 11 Mar 2003 16:21:38 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: (from ticso@localhost) by cicely9.cicely.de (8.12.8/8.12.8/Submit) id h2BFLVAR074162; Tue, 11 Mar 2003 16:21:31 +0100 (CET) Date: Tue, 11 Mar 2003 16:21:31 +0100 From: Bernd Walter To: Christian Hamm Cc: freebsd-hardware@FreeBSD.ORG Subject: Re: USB card reader and recent CURRENT Message-ID: <20030311152130.GA74131@cicely9.cicely.de> Reply-To: ticso@cicely.de References: <20030306221506.273040a9.slice@augusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030306221506.273040a9.slice@augusta.de> X-Operating-System: FreeBSD cicely9.cicely.de 5.0-CURRENT alpha User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Mar 06, 2003 at 10:15:06PM +0100, Christian Hamm wrote: > Hi there, > > I recently bought a quite cheap USB card reader, plugged it into my CURRENT box > in the hope it works out of the box. Recognising the card reader works with a > CF card attached. GEOM creates the device /dev/da3 - but not more *sniff*... Can you please try the following patch: http://www.cosmo-project.de/~bernd/umass-sim.diff Because of some lazyness you currently also need USB_DEBUG. > Mar 6 21:37:23 aurora kernel: umass0: IMGSYS-3 6-in-1, rev 1.10/1.03, addr 2 > Mar 6 21:37:23 aurora kernel: da3 at umass-sim0 bus 0 target 0 lun 0 > Mar 6 21:37:23 aurora kernel: da3: <6-in-1 CF/MD 0202> Removable Direct Access SCSI-0 device > Mar 6 21:37:23 aurora kernel: da3: 1.000MB/s transfers > Mar 6 21:37:23 aurora kernel: da3: 250MB (512000 512 byte sectors: 64H 32S/T 250C) > Mar 6 21:37:23 aurora kernel: umass0: Residue incorrect, was 0, should've been 512 > Mar 6 21:37:23 aurora last message repeated 14 times > > (The last two messages worry me.) Maybe the device failed to produce errors without a media inserted. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Wed Mar 12 10:29:26 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FE7837B401 for ; Wed, 12 Mar 2003 10:29:22 -0800 (PST) Received: from inga.augusta.de (inga.augusta.de [213.179.139.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9785F43FBF for ; Wed, 12 Mar 2003 10:29:19 -0800 (PST) (envelope-from slice@augusta.de) Received: from acfserv.augusta.de (root@acfserv.augusta.de [213.179.139.68]) by inga.augusta.de (8.9.3/8.9.3) with ESMTP id TAA07253; Wed, 12 Mar 2003 19:29:18 +0100 (CET) Received: from aurora.di.augusta.de (p508AAB3B.dip.t-dialin.net [80.138.171.59]) (authenticated bits=0) by acfserv.augusta.de (8.12.5/8.12.5) with ESMTP id h2CITCWA027910; Wed, 12 Mar 2003 19:29:14 +0100 (CET) (envelope-from slice@augusta.de) Date: Wed, 12 Mar 2003 19:29:11 +0100 From: Christian Hamm To: ticso@cicely.de Cc: freebsd-hardware@FreeBSD.ORG Subject: Re: USB card reader and recent CURRENT Message-Id: <20030312192911.35b3777e.slice@augusta.de> In-Reply-To: <20030311152130.GA74131@cicely9.cicely.de> References: <20030306221506.273040a9.slice@augusta.de> <20030311152130.GA74131@cicely9.cicely.de> X-Mailer: Sylpheed version 0.8.10 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Thank you for the patch! On Tue, 11 Mar 2003 16:21:31 +0100 Bernd Walter wrote: > On Thu, Mar 06, 2003 at 10:15:06PM +0100, Christian Hamm wrote: > > Hi there, > > > > I recently bought a quite cheap USB card reader, plugged it into my CURRENT box > > in the hope it works out of the box. Recognising the card reader works with a > > CF card attached. GEOM creates the device /dev/da3 - but not more *sniff*... > > Can you please try the following patch: > http://www.cosmo-project.de/~bernd/umass-sim.diff > Because of some lazyness you currently also need USB_DEBUG. OK, recompiled with the patch. The 4 ports of the device are now detected properly (I have devices da3 through da6 - at the time I wrote the last mail I only had da3). Accessing the CF card still doesn't work. Trying to do a disklabel on the device fails with an I/O error. The card is only detected (size, sector info...) if it is pre-attached to the reader when plugged in. Here is what the log says: Mar 12 19:10:03 aurora kernel: uhub0: port error, restarting port 2 Mar 12 19:10:04 aurora kernel: umass0: IMGSYS-3 6-in-1, rev 1.10/1.03, addr 2 Mar 12 19:10:04 aurora kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000 Mar 12 19:10:04 aurora kernel: umass0:1:0:-1: Attached to scbus1 as device 0 Mar 12 19:10:04 aurora kernel: can't re-use a leaf (minimum_cmd_size)! Mar 12 19:10:04 aurora kernel: da3 at umass-sim0 bus 0 target 0 lun 0 Mar 12 19:10:04 aurora kernel: da3: <6-in-1 CF/MD 0202> Removable Direct Access SCSI-0 device Mar 12 19:10:04 aurora kernel: da3: 1.000MB/s transfers Mar 12 19:10:04 aurora kernel: da3: 250MB (512000 512 byte sectors: 64H 32S/T 250C) Mar 12 19:10:04 aurora kernel: can't re-use a leaf (minimum_cmd_size)! Mar 12 19:10:04 aurora kernel: umass0: Residue incorrect, was 0, should've been 512 Mar 12 19:10:04 aurora last message repeated 4 times Mar 12 19:10:04 aurora kernel: da4 at umass-sim0 bus 0 target 0 lun 1 Mar 12 19:10:04 aurora kernel: da4: <6-in-1 SM 0202> Removable Direct Access SCSI-0 device Mar 12 19:10:04 aurora kernel: da4: 1.000MB/s transfers Mar 12 19:10:04 aurora kernel: da4: Attempt to query device size failed: NOT READY, Medium not present Mar 12 19:10:04 aurora kernel: can't re-use a leaf (minimum_cmd_size)! Mar 12 19:10:04 aurora kernel: da5 at umass-sim0 bus 0 target 0 lun 2 Mar 12 19:10:04 aurora kernel: da5: <6-in-1 SD/MMC 0202> Removable Direct Access SCSI-0 device Mar 12 19:10:04 aurora kernel: da5: 1.000MB/s transfers Mar 12 19:10:04 aurora kernel: da5: Attempt to query device size failed: NOT READY, Medium not present Mar 12 19:10:04 aurora kernel: umass0: Residue incorrect, was 0, should've been 512 Mar 12 19:10:04 aurora last message repeated 9 times Mar 12 19:10:04 aurora kernel: can't re-use a leaf (minimum_cmd_size)! Mar 12 19:10:04 aurora kernel: da6 at umass-sim0 bus 0 target 0 lun 3 Mar 12 19:10:04 aurora kernel: da6: <6-in-1 MS 0202> Removable Direct Access SCSI-0 device Mar 12 19:10:04 aurora kernel: da6: 1.000MB/s transfers Mar 12 19:10:04 aurora kernel: da6: Attempt to query device size failed: NOT READY, Medium not present Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): READ CAPACITY. CDB: 25 20 0 0 0 0 0 0 0 0 Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): CAM Status: SCSI Status Error Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): SCSI Status: Check Condition Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): NOT READY asc:3a,0 Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): Medium not present Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): Unretryable error Mar 12 19:10:04 aurora kernel: Opened disk da4 -> 6 Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): READ CAPACITY. CDB: 25 20 0 0 0 0 0 0 0 0 Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): CAM Status: SCSI Status Error Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): SCSI Status: Check Condition Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): NOT READY asc:3a,0 Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): Medium not present Mar 12 19:10:04 aurora kernel: (da4:umass-sim0:0:0:1): Unretryable error Mar 12 19:10:04 aurora kernel: Opened disk da4 -> 6 Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): READ CAPACITY. CDB: 25 40 0 0 0 0 0 0 0 0 Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): CAM Status: SCSI Status Error Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): SCSI Status: Check Condition Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): NOT READY asc:3a,0 Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): Medium not present Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): Unretryable error Mar 12 19:10:04 aurora kernel: Opened disk da5 -> 6 Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): READ CAPACITY. CDB: 25 40 0 0 0 0 0 0 0 0 Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): CAM Status: SCSI Status Error Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): SCSI Status: Check Condition Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): NOT READY asc:3a,0 Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): Medium not present Mar 12 19:10:04 aurora kernel: (da5:umass-sim0:0:0:2): Unretryable error Mar 12 19:10:04 aurora kernel: Opened disk da5 -> 6 Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): READ CAPACITY. CDB: 25 60 0 0 0 0 0 0 0 0 Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): CAM Status: SCSI Status Error Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): SCSI Status: Check Condition Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): NOT READY asc:3a,0 Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): Medium not present Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): Unretryable error Mar 12 19:10:04 aurora kernel: Opened disk da6 -> 6 Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): READ CAPACITY. CDB: 25 60 0 0 0 0 0 0 0 0 Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): CAM Status: SCSI Status Error Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): SCSI Status: Check Condition Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): NOT READY asc:3a,0 Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): Medium not present Mar 12 19:10:04 aurora kernel: (da6:umass-sim0:0:0:3): Unretryable error Mar 12 19:10:04 aurora kernel: Opened disk da6 -> 6 Detaching the device looks fine: Mar 12 19:16:22 aurora kernel: umass0: at uhub0 port 2 (addr 2) disconnected Mar 12 19:16:22 aurora kernel: (da3:umass-sim0:0:0:0): lost device Mar 12 19:16:22 aurora kernel: (da3:umass-sim0:0:0:0): removing device entry Mar 12 19:16:22 aurora kernel: (da4:umass-sim0:0:0:1): lost device Mar 12 19:16:22 aurora kernel: (da4:umass-sim0:0:0:1): removing device entry Mar 12 19:16:22 aurora kernel: (da5:umass-sim0:0:0:2): lost device Mar 12 19:16:22 aurora kernel: (da5:umass-sim0:0:0:2): removing device entry Mar 12 19:16:22 aurora kernel: (da6:umass-sim0:0:0:3): lost device Mar 12 19:16:22 aurora kernel: (da6:umass-sim0:0:0:3): removing device entry Mar 12 19:16:22 aurora kernel: umass0: detached > > Mar 6 21:37:23 aurora kernel: umass0: Residue incorrect, was 0, should've been 512 > > Mar 6 21:37:23 aurora last message repeated 14 times > > > > (The last two messages worry me.) > > Maybe the device failed to produce errors without a media inserted. The media is inserted all the time. It doesn't detect it when it is plugged in afterwards. bye Christian -- Christian Hamm ------------------------------------------------------ Location: Augsburg::Bavaria::Germany::Earth::Sol Nickname: Slice IRCNet: Slice FinalFrontier: Slice http://www.augusta.de/~slice/ Visit the ACF at http://www.augusta.de/ ------------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Wed Mar 12 11:55:40 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43A4337B401 for ; Wed, 12 Mar 2003 11:55:38 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5FF743FE1 for ; Wed, 12 Mar 2003 11:55:26 -0800 (PST) (envelope-from ticso@cicely9.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.8/8.12.8) with ESMTP id h2CJtGgt055932 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 12 Mar 2003 20:55:24 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (cicely9.cicely.de [IPv6:3ffe:400:8d0:301:210:5aff:fe30:1c1a]) by cicely5.cicely.de (8.12.8/8.12.8) with ESMTP id h2CJtBX1019931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Mar 2003 20:55:12 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (localhost [127.0.0.1]) by cicely9.cicely.de (8.12.8/8.12.8) with ESMTP id h2CJtAkv078152; Wed, 12 Mar 2003 20:55:10 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: (from ticso@localhost) by cicely9.cicely.de (8.12.8/8.12.8/Submit) id h2CJt9qw078151; Wed, 12 Mar 2003 20:55:09 +0100 (CET) Date: Wed, 12 Mar 2003 20:55:09 +0100 From: Bernd Walter To: Christian Hamm Cc: ticso@cicely.de, freebsd-hardware@FreeBSD.ORG Subject: Re: USB card reader and recent CURRENT Message-ID: <20030312195508.GY74131@cicely9.cicely.de> Reply-To: ticso@cicely.de References: <20030306221506.273040a9.slice@augusta.de> <20030311152130.GA74131@cicely9.cicely.de> <20030312192911.35b3777e.slice@augusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030312192911.35b3777e.slice@augusta.de> X-Operating-System: FreeBSD cicely9.cicely.de 5.0-CURRENT alpha User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Mar 12, 2003 at 07:29:11PM +0100, Christian Hamm wrote: > Thank you for the patch! > > On Tue, 11 Mar 2003 16:21:31 +0100 > Bernd Walter wrote: > > > On Thu, Mar 06, 2003 at 10:15:06PM +0100, Christian Hamm wrote: > > > Hi there, > > > > > > I recently bought a quite cheap USB card reader, plugged it into my CURRENT box > > > in the hope it works out of the box. Recognising the card reader works with a > > > CF card attached. GEOM creates the device /dev/da3 - but not more *sniff*... > > > > Can you please try the following patch: > > http://www.cosmo-project.de/~bernd/umass-sim.diff > > Because of some lazyness you currently also need USB_DEBUG. > > OK, recompiled with the patch. The 4 ports of the device are now detected > properly (I have devices da3 through da6 - at the time I wrote the last mail I only > had da3). Accessing the CF card still doesn't work. Trying to do a disklabel > on the device fails with an I/O error. Did you already tried an DA_Q_NO_6_BYTE Quirk in sys/cam/scsi/scsi_da.c? > The media is inserted all the time. It doesn't detect it when it is plugged > in afterwards. That's expected. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Wed Mar 12 12:22: 7 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DB3537B401 for ; Wed, 12 Mar 2003 12:22:06 -0800 (PST) Received: from inga.augusta.de (inga.augusta.de [213.179.139.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E74C43FB1 for ; Wed, 12 Mar 2003 12:22:04 -0800 (PST) (envelope-from slice@augusta.de) Received: from acfserv.augusta.de (root@acfserv.augusta.de [213.179.139.68]) by inga.augusta.de (8.9.3/8.9.3) with ESMTP id VAA14644; Wed, 12 Mar 2003 21:22:04 +0100 (CET) Received: from aurora.di.augusta.de (p508AAB3B.dip.t-dialin.net [80.138.171.59]) (authenticated bits=0) by acfserv.augusta.de (8.12.5/8.12.5) with ESMTP id h2CKM0WA029031; Wed, 12 Mar 2003 21:22:01 +0100 (CET) (envelope-from slice@augusta.de) Date: Wed, 12 Mar 2003 21:22:00 +0100 From: Christian Hamm To: ticso@cicely.de Cc: freebsd-hardware@FreeBSD.ORG Subject: Re: USB card reader and recent CURRENT Message-Id: <20030312212200.2ec95a46.slice@augusta.de> In-Reply-To: <20030312195508.GY74131@cicely9.cicely.de> References: <20030306221506.273040a9.slice@augusta.de> <20030311152130.GA74131@cicely9.cicely.de> <20030312192911.35b3777e.slice@augusta.de> <20030312195508.GY74131@cicely9.cicely.de> X-Mailer: Sylpheed version 0.8.10 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 12 Mar 2003 20:55:09 +0100 Bernd Walter wrote: > On Wed, Mar 12, 2003 at 07:29:11PM +0100, Christian Hamm wrote: > > OK, recompiled with the patch. The 4 ports of the device are now detected > > properly (I have devices da3 through da6 - at the time I wrote the last mail I only > > had da3). Accessing the CF card still doesn't work. Trying to do a disklabel > > on the device fails with an I/O error. > > Did you already tried an DA_Q_NO_6_BYTE Quirk in sys/cam/scsi/scsi_da.c? Ermh no? - how should I have known about it? :-) Looking at the file says me to add an entry to da_quirk_table[] right? bye Christian PS: I'm not the passionate kernel hacker - I've only discovered the problem :-) -- Christian Hamm ------------------------------------------------------ Location: Augsburg::Bavaria::Germany::Earth::Sol Nickname: Slice IRCNet: Slice FinalFrontier: Slice http://www.augusta.de/~slice/ Visit the ACF at http://www.augusta.de/ ------------------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Wed Mar 12 12:27:40 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC99737B401 for ; Wed, 12 Mar 2003 12:27:38 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2682743F75 for ; Wed, 12 Mar 2003 12:27:36 -0800 (PST) (envelope-from ticso@cicely9.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.8/8.12.8) with ESMTP id h2CKREgt056758 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 12 Mar 2003 21:27:32 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (cicely9.cicely.de [IPv6:3ffe:400:8d0:301:210:5aff:fe30:1c1a]) by cicely5.cicely.de (8.12.8/8.12.8) with ESMTP id h2CKR9X1020193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Mar 2003 21:27:10 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (localhost [127.0.0.1]) by cicely9.cicely.de (8.12.8/8.12.8) with ESMTP id h2CKR8kv078221; Wed, 12 Mar 2003 21:27:08 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: (from ticso@localhost) by cicely9.cicely.de (8.12.8/8.12.8/Submit) id h2CKR8LG078220; Wed, 12 Mar 2003 21:27:08 +0100 (CET) Date: Wed, 12 Mar 2003 21:27:07 +0100 From: Bernd Walter To: Christian Hamm Cc: ticso@cicely.de, freebsd-hardware@FreeBSD.ORG Subject: Re: USB card reader and recent CURRENT Message-ID: <20030312202707.GZ74131@cicely9.cicely.de> Reply-To: ticso@cicely.de References: <20030306221506.273040a9.slice@augusta.de> <20030311152130.GA74131@cicely9.cicely.de> <20030312192911.35b3777e.slice@augusta.de> <20030312195508.GY74131@cicely9.cicely.de> <20030312212200.2ec95a46.slice@augusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030312212200.2ec95a46.slice@augusta.de> X-Operating-System: FreeBSD cicely9.cicely.de 5.0-CURRENT alpha User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, Mar 12, 2003 at 09:22:00PM +0100, Christian Hamm wrote: > On Wed, 12 Mar 2003 20:55:09 +0100 > Bernd Walter wrote: > > > On Wed, Mar 12, 2003 at 07:29:11PM +0100, Christian Hamm wrote: > > > OK, recompiled with the patch. The 4 ports of the device are now detected > > > properly (I have devices da3 through da6 - at the time I wrote the last mail I only > > > had da3). Accessing the CF card still doesn't work. Trying to do a disklabel > > > on the device fails with an I/O error. > > > > Did you already tried an DA_Q_NO_6_BYTE Quirk in sys/cam/scsi/scsi_da.c? > > Ermh no? - how should I have known about it? :-) > Looking at the file says me to add an entry to da_quirk_table[] right? Excatly. Just copy a block from another drive and update the vendor and product string to match yours. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Wed Mar 12 17:38:18 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E31C637B404; Wed, 12 Mar 2003 17:38:15 -0800 (PST) Received: from ecserv7.uwaterloo.ca (ecserv7.uwaterloo.ca [129.97.50.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FC1043F85; Wed, 12 Mar 2003 17:38:14 -0800 (PST) (envelope-from bruce@engmail.uwaterloo.ca) Received: from ecserv7.uwaterloo.ca (localhost.uwaterloo.ca [127.0.0.1]) by ecserv7.uwaterloo.ca (8.12.6/8.12.6) with ESMTP id h2D1cDpc030095; Wed, 12 Mar 2003 20:38:13 -0500 (EST) (envelope-from bruce@engmail.uwaterloo.ca) Received: (from www@localhost) by ecserv7.uwaterloo.ca (8.12.6/8.12.6/Submit) id h2D1cDPG030094; Wed, 12 Mar 2003 20:38:13 -0500 (EST) X-Authentication-Warning: ecserv7.uwaterloo.ca: www set sender to bruce@engmail.uwaterloo.ca using -f Received: from 65.93.97.169 ( [65.93.97.169]) as user bruce@engmail.uwaterloo.ca by www.nexusmail.uwaterloo.ca with HTTP; Wed, 12 Mar 2003 20:38:13 -0500 Message-ID: <1047519493.3e6fe105a4f15@www.nexusmail.uwaterloo.ca> Date: Wed, 12 Mar 2003 20:38:13 -0500 From: Bruce Campbell To: freebsd-questions@freebsd.org, freebsd-hardware@freebsd.org Subject: problem on 1TB filesystem RAID 5 3ware MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 / FreeBSD-4.6.2 X-Originating-IP: 65.93.97.169 Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org File corruption on 2 identical systems, designed to be backup servers to contain dumps of other systems: FreeBSD ecserv18.uwaterloo.ca 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9 15:08:34 GMT 2002 root@builder.freebsdmall.com:/usr/obj/usr/src/sys/GENERIC i386 with 1TB /backup partition, on a 3ware 7500-8 ATA RAID card, RAID 5: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/twed0s1a 20644846 906552 18086708 5% / procfs 4 4 0 100% /proc /dev/twed0s1e 938819776 279031856 584682338 32% /backup disks are 6 x Western Digital 2000JB (200GB) I ran tests on /backup for 10 days on each system (fill disk with 50GB files of pseudo random data, then reading them all back and verify contents, then erase, then start over). Tests ran perfectly. details on hardware config at: http://www.freebsd.uwaterloo.ca/twiki/bin/view/Freebsd/BackupServerHardware Then, I was ready to put the systems into production, so I copied data from my 2 older backup servers (which have 360GB vinum partitions) and after copying the data (approx 250GB in 325 files) about a dozen files were corrupt after the copy. I copied via an NFS mount. All corruption started on a 64K boundary, except one which was on a 16K boundary. Recopied the dozen corrupt files, and then only 6 were corrupt. Same problem on both systems, each which copied from a different source server. File seems corrupt to the end after first corruption starts, I have not looked for a pattern to see if it is another files contents, or misplaced contents from the same file. fsck shows no problems Restarted my test filling with 50GB files again, has run perfectly. I plan to try: - turn off soft updates - RAID 10 instead of 5 - different file system parameters, for example I don't need 100 million inodes. - rcp'ing the files - staring at computer screen By the way, 3ware has not officially approved the WD 200GB drive last time I checked. Lots of good experience with the motherboard (ASUS P4S533) and network card (Intel Pro/100). Lots of good experience with vinum striped partitions of smaller size (360GB) Does anyone have any suggestions ? -- Bruce Campbell Engineering Computing CPH-2374B University of Waterloo (519)888-4567 ext 5889 ---------------------------------------- This mail sent through www.mywaterloo.ca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Wed Mar 12 18:32:30 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B80537B401; Wed, 12 Mar 2003 18:32:27 -0800 (PST) Received: from ecserv7.uwaterloo.ca (ecserv7.uwaterloo.ca [129.97.50.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF51243FA3; Wed, 12 Mar 2003 18:32:25 -0800 (PST) (envelope-from bruce@engmail.uwaterloo.ca) Received: from ecserv7.uwaterloo.ca (localhost.uwaterloo.ca [127.0.0.1]) by ecserv7.uwaterloo.ca (8.12.6/8.12.6) with ESMTP id h2D2WNpc031930; Wed, 12 Mar 2003 21:32:23 -0500 (EST) (envelope-from bruce@engmail.uwaterloo.ca) Received: (from www@localhost) by ecserv7.uwaterloo.ca (8.12.6/8.12.6/Submit) id h2D2WMBc031929; Wed, 12 Mar 2003 21:32:22 -0500 (EST) X-Authentication-Warning: ecserv7.uwaterloo.ca: www set sender to bruce@engmail.uwaterloo.ca using -f Received: from 65.93.97.169 ( [65.93.97.169]) as user bruce@engmail.uwaterloo.ca by www.nexusmail.uwaterloo.ca with HTTP; Wed, 12 Mar 2003 21:32:22 -0500 Message-ID: <1047522742.3e6fedb6d7f9c@www.nexusmail.uwaterloo.ca> Date: Wed, 12 Mar 2003 21:32:22 -0500 From: Bruce Campbell To: Simon Cc: "freebsd-hardware@freebsd.org" , "freebsd-questions@freebsd.org" Subject: Re: problem on 1TB filesystem RAID 5 3ware References: <200303130144.h2D1iO706855@engmail.uwaterloo.ca> In-Reply-To: <200303130144.h2D1iO706855@engmail.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 / FreeBSD-4.6.2 X-Originating-IP: 65.93.97.169 Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Quoting Simon : > > I can only hope I don't have the same issue. I'm currently building a 1.75TB > NAS to do daily backups using 3ware 7500-8 and maxtor drives. Tiny bit more info: - NFS was starting to be implicated, but on one of my backup servers I had let it run 2 dumps of our Network Appliance, basically: rsh netapp dump ... | gzip > file and I tried "gunzip -t" to test the file, and both were corrupt. My backup system I've been running with vinum for a long time does a weekly "gunzip -t" on all files, and I've not seen a problem before. This also removes the network card from suspicion, as if it was the problem, the .gz file would still be valid (it would just be compressed garbage, but it would not be corrupt itself) Here is the program I wrote to test the partitions: http://www.freebsd.uwaterloo.ca/twiki/bin/view/Freebsd/BurnInProcedure (obviously not an outstanding test, since it passed my system) > > -Simon > > On Wed, 12 Mar 2003 20:38:13 -0500, Bruce Campbell wrote: > > > > >File corruption on 2 identical systems, designed to be backup > >servers to contain dumps of other systems: > > > >FreeBSD ecserv18.uwaterloo.ca 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9 > > >15:08:34 GMT 2002 root@builder.freebsdmall.com:/usr/obj/usr/src/sys/GENERIC > > >i386 > > > >with 1TB /backup partition, on a 3ware 7500-8 ATA RAID card, RAID 5: > > > >Filesystem 1K-blocks Used Avail Capacity Mounted on > >/dev/twed0s1a 20644846 906552 18086708 5% / > >procfs 4 4 0 100% /proc > >/dev/twed0s1e 938819776 279031856 584682338 32% /backup > > > >disks are 6 x Western Digital 2000JB (200GB) > > > >I ran tests on /backup for 10 days on each system (fill disk with > >50GB files of pseudo random data, then reading them all back and > >verify contents, then erase, then start over). Tests ran perfectly. > > > >details on hardware config at: > > > >http://www.freebsd.uwaterloo.ca/twiki/bin/view/Freebsd/BackupServerHardware > > > >Then, I was ready to put the systems into production, so I copied > >data from my 2 older backup servers (which have 360GB vinum partitions) > >and after copying the data (approx 250GB in 325 files) about a dozen > >files were corrupt after the copy. I copied via an NFS mount. > > > >All corruption started on a 64K boundary, except one which was on a 16K > >boundary. Recopied the dozen corrupt files, and then only 6 were corrupt. > >Same problem on both systems, each which copied from a different source > >server. > > > >File seems corrupt to the end after first corruption starts, I have > >not looked for a pattern to see if it is another files contents, > >or misplaced contents from the same file. > > > >fsck shows no problems > > > >Restarted my test filling with 50GB files again, has run perfectly. > > > >I plan to try: > > > > - turn off soft updates > > - RAID 10 instead of 5 > > - different file system parameters, for example I don't need > > 100 million inodes. > > - rcp'ing the files > > - staring at computer screen > > > >By the way, 3ware has not officially approved the WD 200GB drive last > >time I checked. > > > >Lots of good experience with the motherboard (ASUS P4S533) and > >network card (Intel Pro/100). Lots of good experience with > >vinum striped partitions of smaller size (360GB) > > > >Does anyone have any suggestions ? > > > >-- > >Bruce Campbell > >Engineering Computing > >CPH-2374B > >University of Waterloo > >(519)888-4567 ext 5889 > > > >---------------------------------------- > >This mail sent through www.mywaterloo.ca > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org > >with "unsubscribe freebsd-hardware" in the body of the message > > > > > -- Bruce Campbell Engineering Computing CPH-2374B University of Waterloo (519)888-4567 ext 5889 ---------------------------------------- This mail sent through www.mywaterloo.ca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Fri Mar 14 7:52: 3 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD3D437B404; Fri, 14 Mar 2003 07:51:58 -0800 (PST) Received: from ecserv7.uwaterloo.ca (ecserv7.uwaterloo.ca [129.97.50.127]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9E0A43F93; Fri, 14 Mar 2003 07:51:57 -0800 (PST) (envelope-from bruce@engmail.uwaterloo.ca) Received: from ecserv7.uwaterloo.ca (localhost.uwaterloo.ca [127.0.0.1]) by ecserv7.uwaterloo.ca (8.12.6/8.12.6) with ESMTP id h2EFpupc097257; Fri, 14 Mar 2003 10:51:56 -0500 (EST) (envelope-from bruce@engmail.uwaterloo.ca) Received: (from www@localhost) by ecserv7.uwaterloo.ca (8.12.6/8.12.6/Submit) id h2EFpuN0097256; Fri, 14 Mar 2003 10:51:56 -0500 (EST) X-Authentication-Warning: ecserv7.uwaterloo.ca: www set sender to bruce@engmail.uwaterloo.ca using -f Received: from 129.97.50.50 ( [129.97.50.50]) as user bruce@engmail.uwaterloo.ca by www.nexusmail.uwaterloo.ca with HTTP; Fri, 14 Mar 2003 10:51:56 -0500 Message-ID: <1047657116.3e71fa9c28266@www.nexusmail.uwaterloo.ca> Date: Fri, 14 Mar 2003 10:51:56 -0500 From: Bruce Campbell To: freebsd-questions@freebsd.org, freebsd-hardware@freebsd.org Subject: Re: problem on 1TB filesystem RAID 5 3ware References: <1047519493.3e6fe105a4f15@www.nexusmail.uwaterloo.ca> In-Reply-To: <1047519493.3e6fe105a4f15@www.nexusmail.uwaterloo.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 / FreeBSD-4.6.2 X-Originating-IP: 129.97.50.50 Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Not solved this yet, but I have determined a few things that the problem isn't. Info at: http://www.freebsd.uwaterloo.ca/twiki/bin/view/Freebsd/BackupServerProblem Tested with soft updates off and on, fails in either case, so that isn't it. Seems like the problem is either: - 3ware card or driver - something to do with the large filesystem Quoting Bruce Campbell : > > File corruption on 2 identical systems, designed to be backup > servers to contain dumps of other systems: > > FreeBSD ecserv18.uwaterloo.ca 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Wed Oct 9 > > 15:08:34 GMT 2002 root@builder.freebsdmall.com:/usr/obj/usr/src/sys/GENERIC > > i386 > > with 1TB /backup partition, on a 3ware 7500-8 ATA RAID card, RAID 5: > > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/twed0s1a 20644846 906552 18086708 5% / > procfs 4 4 0 100% /proc > /dev/twed0s1e 938819776 279031856 584682338 32% /backup > > disks are 6 x Western Digital 2000JB (200GB) > > I ran tests on /backup for 10 days on each system (fill disk with > 50GB files of pseudo random data, then reading them all back and > verify contents, then erase, then start over). Tests ran perfectly. > > details on hardware config at: > > http://www.freebsd.uwaterloo.ca/twiki/bin/view/Freebsd/BackupServerHardware > > Then, I was ready to put the systems into production, so I copied > data from my 2 older backup servers (which have 360GB vinum partitions) > and after copying the data (approx 250GB in 325 files) about a dozen > files were corrupt after the copy. I copied via an NFS mount. > > All corruption started on a 64K boundary, except one which was on a 16K > boundary. Recopied the dozen corrupt files, and then only 6 were corrupt. > Same problem on both systems, each which copied from a different source > server. > > File seems corrupt to the end after first corruption starts, I have > not looked for a pattern to see if it is another files contents, > or misplaced contents from the same file. > > fsck shows no problems > > Restarted my test filling with 50GB files again, has run perfectly. > > I plan to try: > > - turn off soft updates > - RAID 10 instead of 5 > - different file system parameters, for example I don't need > 100 million inodes. > - rcp'ing the files > - staring at computer screen > > By the way, 3ware has not officially approved the WD 200GB drive last > time I checked. > > Lots of good experience with the motherboard (ASUS P4S533) and > network card (Intel Pro/100). Lots of good experience with > vinum striped partitions of smaller size (360GB) > > Does anyone have any suggestions ? > > -- > Bruce Campbell > Engineering Computing > CPH-2374B > University of Waterloo > (519)888-4567 ext 5889 > > ---------------------------------------- > This mail sent through www.mywaterloo.ca > -- Bruce Campbell Engineering Computing CPH-2374B University of Waterloo (519)888-4567 ext 5889 ---------------------------------------- This mail sent through www.mywaterloo.ca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message From owner-freebsd-hardware Sat Mar 15 19:37:23 2003 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAB0237B401 for ; Sat, 15 Mar 2003 19:36:46 -0800 (PST) Received: from mail.pubnix.net (Mail.pubnix.net [192.172.250.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9AAD43F75 for ; Sat, 15 Mar 2003 19:36:43 -0800 (PST) (envelope-from ahebert@pubnix.net) Received: from pubnix.net (localhost.pubnix.net [127.0.0.1]) by mail.pubnix.net (8.9.3/8.9.3) with ESMTP id WAA87437 for ; Sat, 15 Mar 2003 22:36:42 -0500 (EST) (envelope-from ahebert@pubnix.net) Message-ID: <3E73F149.C8972C3A@pubnix.net> Date: Sat, 15 Mar 2003 22:36:41 -0500 From: Alain Hebert Reply-To: ahebert@pubnix.net Organization: PubNIX, Inc. X-Mailer: Mozilla 4.8 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hardware@FreeBSD.ORG Subject: Beta: 4.8 and 5.0 compatible driver for usb-eth (linux ethernet for iPAQ) Content-Type: multipart/mixed; boundary="------------88CC297AF3B3D9A9802D2732" Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------88CC297AF3B3D9A9802D2732 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Here it is. Anybody interested? I need to clean, comment, add licensing, and make man page. (Thanks to Bill Paul for if_kue.c, which was used as a template for this one, and udbp guys). Have fun... -- Alain Hebert ahebert@pubnix.net PubNIX Inc. P.O. Box 147 Cote Saint Luc, Quebec H4V 2Y3 tel 514-990-5911 http://www.pubnix.net fax 514-990-9443 --------------88CC297AF3B3D9A9802D2732 Content-Type: text/plain; charset=us-ascii; name="if_lueth.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_lueth.c" /*==========================================================================* * * File: . * * Description: . * *--------------------------------------------------------------------------* * * Log: * [date] [username] [comments] * ~ ~ ~ * *--------------------------------------------------------------------------* * $Id: if_lueth.c,v 1.1 2003/03/16 03:32:03 aal Exp $ *--------------------------------------------------------------------------* * Copyright 2002 - Kerner Innovations, Inc. (http://www.kinovations.com) *==========================================================================*/ /*--------------------------------------------------------------------------* * Global Includes *--------------------------------------------------------------------------*/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define FREEBSD_4 #undef FREEBSD_4 #define FREEBSD_5 /*#undef FREEBSD_4*/ /*--------------------------------------------------------------------------* * Local Includes *--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------* * Local Defines *--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------* * Debug Macros *--------------------------------------------------------------------------*/ #define DEBUG #undef DEBUG #if defined(DEBUG) #define DEBUG_PARMS(fmt,x...) \ printf("I - %s - %s - %d - " fmt "\n", \ __FILE__, \ __PRETTY_FUNCTION__, \ __LINE__, \ x) #define DEBUG_TRACE(fmt,x...) \ printf("T - %s - %s - %d - " fmt "\n", \ __FILE__, \ __PRETTY_FUNCTION__, \ __LINE__, \ x) #define DEBUG_DUMP(src,len) \ _lueth_dump(__FILE__, \ __PRETTY_FUNCTION__, \ __LINE__, \ src, \ len) #define DEBUG_RETURN(fmt,x...) \ printf("O - %s - %s - %d - " fmt "\n", \ __FILE__, \ __PRETTY_FUNCTION__, \ __LINE__, \ x) #else #define DEBUG_PARMS(fmt,x...) #define DEBUG_TRACE(fmt,x...) #define DEBUG_RETURN(fmt,x...) #define DEBUG_DUMP(src,len) #endif /*--------------------------------------------------------------------------* * Driver Defines *--------------------------------------------------------------------------*/ #define LUETH_ENDPT_RX 0x0 #define LUETH_ENDPT_TX 0x1 #define LUETH_ENDPT_INTR 0x2 #define LUETH_ENDPT_MAX 0x3 #define LUETH_BUFSZ 1536 #define LUETH_RX_LIST_CNT 1 #define LUETH_TX_LIST_CNT 1 #define LUETH_RXFILT_PROMISC 0x0001 #define LUETH_RXFILT_ALLMULTI 0x0002 #define LUETH_RXFILT_UNICAST 0x0004 #define LUETH_RXFILT_BROADCAST 0x0008 #define LUETH_RXFILT_MULTICAST 0x0010 /*--------------------------------------------------------------------------* * Local Typedefs *--------------------------------------------------------------------------*/ typedef struct _lueth_chain lueth_chain_t; typedef lueth_chain_t *plueth_chain_t; typedef struct _lueth_cdata lueth_cdata_t; typedef lueth_cdata_t *plueth_cdata_t; typedef struct lueth_softc lueth_softc_t; typedef lueth_softc_t *plueth_softc_t; struct _lueth_chain { plueth_softc_t pPrivate; usbd_xfer_handle xfer; char *buf; struct mbuf *mbuf; int idx; }; struct _lueth_cdata { lueth_chain_t tx_chain[LUETH_TX_LIST_CNT]; lueth_chain_t rx_chain[LUETH_RX_LIST_CNT]; int tx_prod; int tx_cons; int tx_cnt; int rx_prod; }; struct lueth_softc { usbd_device_handle udev; usbd_interface_handle iface; int unit; int ed[LUETH_ENDPT_MAX]; usbd_pipe_handle ep[LUETH_ENDPT_MAX]; u_int8_t gone; int if_flags; struct arpcom arpcom; lueth_cdata_t cdata; u_int16_t rxfilt; #if 0 struct kue_ether_desc kue_desc; u_int8_t *kue_mcfilters; struct kue_ether_desc { u_int8_t kue_len; u_int8_t kue_rsvd0; u_int8_t kue_rsvd1; u_int8_t kue_macaddr[ETHER_ADDR_LEN]; u_int8_t kue_etherstats[4]; u_int8_t kue_maxseg[2]; u_int8_t kue_mcastfilt[2]; u_int8_t kue_rsvd2; }; #endif }; struct lueth_type { u_int16_t vid; u_int16_t did; }; /*--------------------------------------------------------------------------* * Local Variables *--------------------------------------------------------------------------*/ Static int _lueth_tx_list_init __P( (plueth_softc_t)); Static int _lueth_rx_list_init __P( (plueth_softc_t)); Static int _lueth_newbuf __P( (plueth_softc_t, plueth_chain_t, struct mbuf *)); Static int _lueth_encap __P( (plueth_softc_t, struct mbuf *, int)); Static void _lueth_rxeof __P( (usbd_xfer_handle, usbd_private_handle, usbd_status)); Static void _lueth_txeof __P( (usbd_xfer_handle, usbd_private_handle, usbd_status)); /*Static void _lueth_setmulti __P( (plueth_softc_t));*/ /*Static void _lueth_reset __P( (plueth_softc_t));*/ Static void _lueth_stop __P( (plueth_softc_t)); Static void lueth_if_init __P( (void *)); Static void lueth_if_start __P( (struct ifnet *)); Static void lueth_if_watchdog __P( (struct ifnet *)); Static int lueth_if_ioctl __P( (struct ifnet *, u_long, caddr_t)); Static void lueth_if_rxstart __P( (struct ifnet *)); Static int lueth_match __P( (device_t)); Static int lueth_attach __P( (device_t)); Static int lueth_detach __P( (device_t)); Static void lueth_shutdown __P( (device_t)); Static devclass_t lueth_devclass; Static struct usb_qdat lueth_qdat; Static struct lueth_type lueth_devs[] = { { USB_VENDOR_COMPAQ, 0x505a }, /* driver_info: &linuxdev_info, */ { 0, 0 } }; /*--------------------------------------------------------------------------* * Global Variables *--------------------------------------------------------------------------*/ /*extern*/ int usbdebug; MODULE_DEPEND(if_lueth, usb, 1, 1, 1); /*==========================================================================* * Internal Functions *==========================================================================*/ /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ #if 1 /*defined(DEBUG)*/ Static void _lueth_dump ( const char *fname, const char *fctname, const int lnumber, unsigned char *pData, int Length ) { int i, j; unsigned char q1, q2, q3, q4; unsigned int *p, q; for(i = 0, p = (unsigned int *)pData; i < Length; i += 16, p += sizeof(*p)) { printf("%08X | ",(unsigned int) p); for(j = 0; j < sizeof(*p); j++) { if ( (i + (j * sizeof(*p))) < Length ) { q = *(p+j); q1 = (q & 0x000000FF) >> 0; q2 = (q & 0x0000FF00) >> 8; q3 = (q & 0x00FF0000) >> 16; q4 = (q & 0xFF000000) >> 24; printf("%02X %02X %02X %02X ",q1,q2,q3,q4); } else printf(" "); } printf("| "); for(j = 0; j < sizeof(*p); j++ ) { if ( (i + (j * sizeof(*p))) < Length ) { q = *(p+j); q1 = (q & 0x000000FF) >> 0; q2 = (q & 0x0000FF00) >> 8; q3 = (q & 0x00FF0000) >> 16; q4 = (q & 0xFF000000) >> 24; if ( (q1 >= ' ') && (q1 < 127) ) printf("%c",q1); else printf("."); if ( (q2 >= ' ') && (q2 < 127) ) printf("%c",q2); else printf("."); if ( (q3 >= ' ') && (q3 < 127) ) printf("%c",q3); else printf("."); if ( (q4 >= ' ') && (q4 < 127) ) printf("%c",q4); else printf("."); } else printf(" "); } printf("|\n"); } } #endif /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static int _lueth_encap(pPrivate,m,idx) plueth_softc_t pPrivate; struct mbuf *m; int idx; { int rc, total_len; plueth_chain_t pChain; usbd_status err; DEBUG_PARMS("pPrivate: %p, m: %p,idx: %d",pPrivate,m,idx); rc = 0; pChain = &pPrivate->cdata.tx_chain[idx]; /*m_copydata(m,0,m->m_pkthdr.len,pChain->buf+2);*/ m_copydata(m,0,m->m_pkthdr.len,pChain->buf); pChain->mbuf = m; total_len = m->m_pkthdr.len; if ( !(total_len % 64) ) total_len++; DEBUG_DUMP(pChain->buf,total_len); /*total_len += 64 - (total_len % 64);*/ /*pChain->buf[0] = (u_int8_t) m->m_pkthdr.len;*/ /*pChain->buf[1] = (u_int8_t) (m->m_pkthdr.len >> 8);*/ usbd_setup_xfer(pChain->xfer, pPrivate->ep[LUETH_ENDPT_TX], pChain, pChain->buf, total_len, 0, 10000000, _lueth_txeof); if ( (err = usbd_transfer(pChain->xfer)) != USBD_IN_PROGRESS) { DEBUG_TRACE("err: %d",err); _lueth_stop(pPrivate); rc = EIO; goto out; } pPrivate->cdata.tx_cnt++; out: DEBUG_RETURN("rc: %d",rc); return(rc); } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static int _lueth_newbuf(pPrivate,pChain,m) plueth_softc_t pPrivate; plueth_chain_t pChain; struct mbuf *m; { int rc; struct mbuf *m_new; DEBUG_PARMS("pPrivate: %p, pChain: %p, m: %p",pPrivate,pChain,m); rc = 0; m_new = NULL; if (m == NULL) { MGETHDR(m_new,M_DONTWAIT,MT_DATA); if (m_new == NULL) { DEBUG_TRACE("lueth%d: no memory for rx list -- packet dropped!", pPrivate->unit); rc = ENOBUFS; goto out; } MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { DEBUG_TRACE("lueth%d: no memory for rx list -- packet dropped!", pPrivate->unit); m_freem(m_new); rc = ENOBUFS; goto out; } m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; } else { m_new = m; m_new->m_len = m_new->m_pkthdr.len = MCLBYTES; m_new->m_data = m_new->m_ext.ext_buf; } pChain->mbuf = m_new; out: DEBUG_RETURN("rc: %d",rc); return(rc); } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static int _lueth_tx_list_init(pPrivate) plueth_softc_t pPrivate; { int i, rc; plueth_cdata_t pCData; plueth_chain_t pChain; DEBUG_PARMS("pPrivate: %p",pPrivate); rc = 0; pCData = &pPrivate->cdata; for (i = 0; i < LUETH_TX_LIST_CNT; i++) { pChain = &pCData->tx_chain[i]; pChain->pPrivate = pPrivate; pChain->idx = i; pChain->mbuf = NULL; if (pChain->xfer == NULL) { pChain->xfer = usbd_alloc_xfer(pPrivate->udev); if (pChain->xfer == NULL) { rc = ENOBUFS; goto out; } } pChain->buf = malloc(LUETH_BUFSZ,M_USBDEV,M_NOWAIT); if (pChain->buf == NULL) { rc = ENOBUFS; goto out; } } out: DEBUG_RETURN("rc: %d",rc); return(rc); } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static int _lueth_rx_list_init(pPrivate) plueth_softc_t pPrivate; { int i, rc; plueth_cdata_t pCData; plueth_chain_t pChain; DEBUG_PARMS("pPrivate: %p",pPrivate); rc = 0; pCData = &pPrivate->cdata; for (i = 0; i < LUETH_RX_LIST_CNT; i++) { pChain = &pCData->rx_chain[i]; pChain->pPrivate = pPrivate; pChain->idx = i; if (_lueth_newbuf(pPrivate, pChain, NULL) == ENOBUFS) { rc = ENOBUFS; goto out; } if (pChain->xfer == NULL) { pChain->xfer = usbd_alloc_xfer(pPrivate->udev); if (pChain->xfer == NULL) { rc = ENOBUFS; goto out; } } } out: DEBUG_RETURN("rc: %d",rc); return(rc); } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static void _lueth_rxeof(xfer,priv,status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; { int total_len; struct mbuf *m; struct ifnet *ifp; u_int16_t len; plueth_softc_t pPrivate; plueth_chain_t pChain; DEBUG_PARMS("xfer: %p, priv: %p, status: %d",xfer,priv,status); total_len = 0; pChain = priv; pPrivate = pChain->pPrivate; ifp = &pPrivate->arpcom.ac_if; if (!(ifp->if_flags & IFF_RUNNING)) goto out; if (status != USBD_NORMAL_COMPLETION) { if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) goto out; DEBUG_TRACE("lueth%d: usb error on rx: %s", pPrivate->unit, usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(pPrivate->ep[LUETH_ENDPT_RX]); goto done; } usbd_get_xfer_status(xfer, NULL, NULL, &total_len, NULL); m = pChain->mbuf; if (total_len <= 1) goto done; #if 0 /*len = *mtod(m, u_int16_t *);*/ len = m->m_len; /*m_adj(m, sizeof(u_int16_t));*/ #else len = total_len; #endif total_len = len; if (len < sizeof(struct ether_header)) { ifp->if_ierrors++; goto done; } ifp->if_ipackets++; m->m_pkthdr.rcvif = (struct ifnet * )&lueth_qdat; m->m_pkthdr.len = m->m_len = total_len; DEBUG_DUMP(mtod(pChain->mbuf,char *),total_len); usb_ether_input(m); goto out; done: usbd_setup_xfer(pChain->xfer, pPrivate->ep[LUETH_ENDPT_RX], pChain, mtod(pChain->mbuf,char *), LUETH_BUFSZ, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, _lueth_rxeof); usbd_transfer(pChain->xfer); out: DEBUG_RETURN("%s","void"); return; } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static void _lueth_txeof(xfer,priv,status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; { int s; usbd_status err; struct ifnet *ifp; plueth_softc_t pPrivate; plueth_chain_t pChain; DEBUG_PARMS("xfer: %p, priv: %p, status: %d",xfer,priv,status); s = splimp(); pChain = priv; pPrivate = pChain->pPrivate; ifp = &pPrivate->arpcom.ac_if; ifp->if_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; if (status != USBD_NORMAL_COMPLETION) { if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) goto out; DEBUG_TRACE("lueth%d: usb error on tx: %s", pPrivate->unit, usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(pPrivate->ep[LUETH_ENDPT_TX]); goto out; } usbd_get_xfer_status(pChain->xfer,NULL,NULL,NULL,&err); DEBUG_TRACE("err: %d",err); if (pChain->mbuf != NULL) { pChain->mbuf->m_pkthdr.rcvif = ifp; usb_tx_done(pChain->mbuf); DEBUG_TRACE("free mbuf: %p",pChain->mbuf); pChain->mbuf = NULL; } if (err) ifp->if_oerrors++; else ifp->if_opackets++; out: DEBUG_RETURN("%s","void"); splx(s); return; } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static void _lueth_stop(pPrivate) plueth_softc_t pPrivate; { usbd_status err; struct ifnet *ifp; int i; DEBUG_PARMS("pPrivate: %p",pPrivate); ifp = &pPrivate->arpcom.ac_if; ifp->if_timer = 0; if (pPrivate->ep[LUETH_ENDPT_RX] != NULL) { if ( (err = usbd_abort_pipe(pPrivate->ep[LUETH_ENDPT_RX])) ) DEBUG_TRACE("lueth%d: abort rx pipe failed: %s", pPrivate->unit, usbd_errstr(err)); if ( (err = usbd_close_pipe(pPrivate->ep[LUETH_ENDPT_RX])) ) DEBUG_TRACE("lueth%d: close rx pipe failed: %s", pPrivate->unit, usbd_errstr(err)); pPrivate->ep[LUETH_ENDPT_RX] = NULL; } if (pPrivate->ep[LUETH_ENDPT_TX] != NULL) { if ( (err = usbd_abort_pipe(pPrivate->ep[LUETH_ENDPT_TX])) ) DEBUG_TRACE("lueth%d: abort tx pipe failed: %s", pPrivate->unit, usbd_errstr(err)); if ( (err = usbd_close_pipe(pPrivate->ep[LUETH_ENDPT_TX])) ) DEBUG_TRACE("lueth%d: close tx pipe failed: %s", pPrivate->unit, usbd_errstr(err)); pPrivate->ep[LUETH_ENDPT_TX] = NULL; } if (pPrivate->ep[LUETH_ENDPT_INTR] != NULL) { if ( (err = usbd_abort_pipe(pPrivate->ep[LUETH_ENDPT_INTR])) ) DEBUG_TRACE("lueth%d: abort intr pipe failed: %s", pPrivate->unit, usbd_errstr(err)); if ( (err = usbd_close_pipe(pPrivate->ep[LUETH_ENDPT_INTR])) ) DEBUG_TRACE("lueth%d: close intr pipe failed: %s", pPrivate->unit, usbd_errstr(err)); pPrivate->ep[LUETH_ENDPT_INTR] = NULL; } for (i = 0; i < LUETH_RX_LIST_CNT; i++) { if (pPrivate->cdata.rx_chain[i].buf != NULL) { DEBUG_TRACE("freeing buf: %p",pPrivate->cdata.rx_chain[i].buf); free(pPrivate->cdata.rx_chain[i].buf, M_USBDEV); pPrivate->cdata.rx_chain[i].buf = NULL; } if (pPrivate->cdata.rx_chain[i].mbuf != NULL) { DEBUG_TRACE("freeing mbuf: %p",pPrivate->cdata.rx_chain[i].mbuf); m_freem(pPrivate->cdata.rx_chain[i].mbuf); pPrivate->cdata.rx_chain[i].mbuf = NULL; } if (pPrivate->cdata.rx_chain[i].xfer != NULL) { DEBUG_TRACE("freeing xfer: %p",pPrivate->cdata.rx_chain[i].xfer); usbd_free_xfer(pPrivate->cdata.rx_chain[i].xfer); pPrivate->cdata.rx_chain[i].xfer = NULL; } } for (i = 0; i < LUETH_TX_LIST_CNT; i++) { if (pPrivate->cdata.tx_chain[i].buf != NULL) { DEBUG_TRACE("freeing buf: %p",pPrivate->cdata.tx_chain[i].buf); free(pPrivate->cdata.tx_chain[i].buf, M_USBDEV); pPrivate->cdata.tx_chain[i].buf = NULL; } if (pPrivate->cdata.tx_chain[i].mbuf != NULL) { DEBUG_TRACE("freeing mbuf: %p",pPrivate->cdata.tx_chain[i].mbuf); m_freem(pPrivate->cdata.tx_chain[i].mbuf); pPrivate->cdata.tx_chain[i].mbuf = NULL; } if (pPrivate->cdata.tx_chain[i].xfer != NULL) { DEBUG_TRACE("freeing xfer: %p",pPrivate->cdata.tx_chain[i].xfer); usbd_free_xfer(pPrivate->cdata.tx_chain[i].xfer); pPrivate->cdata.tx_chain[i].xfer = NULL; } } ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); DEBUG_RETURN("%s","void"); return; } /*==========================================================================* * Ethernet Interface *==========================================================================*/ /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static void lueth_if_init(sc) void *sc; { int i, s; plueth_chain_t pChain; plueth_softc_t pPrivate; struct ifnet *ifp; usbd_status err; DEBUG_PARMS("sc: %p",sc); pPrivate= sc; ifp = &pPrivate->arpcom.ac_if; s = splimp(); if (ifp->if_flags & IFF_RUNNING) goto out; pPrivate->rxfilt = LUETH_RXFILT_UNICAST|LUETH_RXFILT_BROADCAST; if (ifp->if_flags & IFF_PROMISC) pPrivate->rxfilt |= LUETH_RXFILT_PROMISC; if (_lueth_tx_list_init(pPrivate) == ENOBUFS) { DEBUG_TRACE("lueth%d: tx list init failed", pPrivate->unit); goto out; } if (_lueth_rx_list_init(pPrivate) == ENOBUFS) { DEBUG_TRACE("lueth%d: rx list init failed", pPrivate->unit); goto out; } #if 0 _lueth_setmulti(pPrivate); #endif if ( (err=usbd_open_pipe( pPrivate->iface, pPrivate->ed[LUETH_ENDPT_RX], USBD_EXCLUSIVE_USE, &pPrivate->ep[LUETH_ENDPT_RX])) ) { DEBUG_TRACE("lueth%d: open rx pipe failed: %s", pPrivate->unit, usbd_errstr(err)); goto out; } if ( (err = usbd_open_pipe( pPrivate->iface, pPrivate->ed[LUETH_ENDPT_TX], USBD_EXCLUSIVE_USE, &pPrivate->ep[LUETH_ENDPT_TX])) ) { DEBUG_TRACE("lueth%d: open tx pipe failed: %s", pPrivate->unit, usbd_errstr(err)); goto out; } for(i = 0; i < LUETH_RX_LIST_CNT; i++) { pChain = &pPrivate->cdata.rx_chain[i]; usbd_setup_xfer(pChain->xfer, pPrivate->ep[LUETH_ENDPT_RX], pChain, mtod(pChain->mbuf,char *), LUETH_BUFSZ, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, _lueth_rxeof); usbd_transfer(pChain->xfer); } ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; out: DEBUG_RETURN("%s","void"); splx(s); return; } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static void lueth_if_start(ifp) struct ifnet *ifp; { plueth_softc_t pPrivate; struct mbuf *m_head; DEBUG_PARMS("ifp: %p",ifp); pPrivate= ifp->if_softc; m_head = NULL; if (ifp->if_flags & IFF_OACTIVE) goto out; IF_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) goto out; if (_lueth_encap(pPrivate, m_head, 0)) { IF_PREPEND(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; goto out; } #if defined(FREEBSD_4) if (ifp->if_bpf) bpf_mtap(ifp, m_head); #elif defined(FREEBSD_5) BPF_MTAP(ifp, m_head); #else #endif ifp->if_flags |= IFF_OACTIVE; ifp->if_timer = 5; out: DEBUG_RETURN("%s","void"); return; } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static void lueth_if_watchdog(ifp) struct ifnet *ifp; { plueth_softc_t pPrivate; plueth_chain_t pChain; usbd_status stat; DEBUG_PARMS("ifp: %p",ifp); pPrivate = ifp->if_softc; ifp->if_oerrors++; DEBUG_TRACE("lueth%d: watchdog timeout", pPrivate->unit); pChain = &pPrivate->cdata.tx_chain[0]; usbd_get_xfer_status(pChain->xfer, NULL, NULL, NULL, &stat); _lueth_txeof(pChain->xfer, pChain, stat); if (ifp->if_snd.ifq_head != NULL) lueth_if_start(ifp); DEBUG_RETURN("%s","void"); return; } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static int lueth_if_ioctl(ifp,command,data) struct ifnet *ifp; u_long command; caddr_t data; { int s, error; plueth_softc_t pPrivate; DEBUG_PARMS("ifp: %p, command: %lx, data: %p",ifp,command,data); pPrivate= ifp->if_softc; error = 0; s = splimp(); switch(command) { case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if ((ifp->if_flags & IFF_RUNNING) && (ifp->if_flags & IFF_PROMISC) && !(pPrivate->if_flags & IFF_PROMISC)) { pPrivate->rxfilt |= LUETH_RXFILT_PROMISC; #if 0 _lueth_setword( pPrivate, KUE_CMD_SET_PKT_FILTER, pPrivate->rxfilt); #endif } else if ((ifp->if_flags & IFF_RUNNING) && !(ifp->if_flags & IFF_PROMISC) && (pPrivate->if_flags & IFF_PROMISC) ) { pPrivate->rxfilt &= ~LUETH_RXFILT_PROMISC; #if 0 _lueth_setword( pPrivate, KUE_CMD_SET_PKT_FILTER, pPrivate->rxfilt); #endif } else if (!(ifp->if_flags & IFF_RUNNING)) lueth_if_init(pPrivate); } else if (ifp->if_flags & IFF_RUNNING) _lueth_stop(pPrivate); pPrivate->if_flags = ifp->if_flags; error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: #if 0 _lueth_setmulti(pPrivate); #endif error = 0; break; #if defined(FREEBSD_4) case SIOCSIFADDR: case SIOCGIFADDR: case SIOCSIFMTU: error = ether_ioctl(ifp, command, data); break; default: error = EINVAL; break; #elif defined(FREEBSD_5) default: error = ether_ioctl(ifp, command, data); break; #else #error Huh? #endif } splx(s); DEBUG_RETURN("error: %d",error); return(error); } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static void lueth_if_rxstart(ifp) struct ifnet *ifp; { plueth_softc_t pPrivate; plueth_chain_t pChain; DEBUG_PARMS("ifp: %p",ifp); pPrivate = ifp->if_softc; pChain = &pPrivate->cdata.rx_chain[pPrivate->cdata.rx_prod]; if ( _lueth_newbuf(pPrivate,pChain,NULL) == ENOBUFS ) { ifp->if_ierrors++; goto out; } usbd_setup_xfer(pChain->xfer, pPrivate->ep[LUETH_ENDPT_RX], pChain, mtod(pChain->mbuf,char *), LUETH_BUFSZ, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, _lueth_rxeof); usbd_transfer(pChain->xfer); out: DEBUG_RETURN("%s","void"); return; } /*==========================================================================* * Driver Interface *==========================================================================*/ /*--------------------------------------------------------------------------* * Probe for a KLSI chip. *--------------------------------------------------------------------------*/ USB_MATCH(lueth) { int rc; struct lueth_type *t; USB_MATCH_START (lueth,uaa); DEBUG_PARMS("self: %p",self); rc = UMATCH_NONE; if (!uaa->iface) goto out; for(t = lueth_devs; t->vid; t++) { if ((uaa->vendor == t->vid) && (uaa->product == t->did) ) { rc = UMATCH_VENDOR_PRODUCT; break; } } out: DEBUG_RETURN("rc: %d",rc); return(rc); } /*--------------------------------------------------------------------------* * Attach the interface. Allocate softc structures, do setup and * ethernet/BPF attach. *--------------------------------------------------------------------------*/ USB_ATTACH(lueth) { int i, s; char devinfo[1024]; struct ifnet *ifp; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; USB_ATTACH_START (lueth,pPrivate,uaa); DEBUG_PARMS("self: %p",self); usbdebug = 65535; s = splimp(); bzero(pPrivate, sizeof(*pPrivate)); pPrivate->iface = uaa->iface; pPrivate->udev = uaa->device; pPrivate->unit = device_get_unit(self); id = usbd_get_interface_descriptor(uaa->iface); usbd_devinfo(uaa->device, 0, devinfo); device_set_desc_copy(self, devinfo); DEBUG_TRACE("%s: %s", USBDEVNAME(self), devinfo); for(i = 0; i < id->bNumEndpoints; i++) { if ( !(ed = usbd_interface2endpoint_descriptor(uaa->iface, i)) ) { DEBUG_TRACE("lueth%d: couldn't get ep %d",pPrivate->unit,i); splx(s); USB_ATTACH_ERROR_RETURN; } if ((UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN) && (UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) ) { pPrivate->ed[LUETH_ENDPT_RX] = ed->bEndpointAddress; DEBUG_TRACE("Endpoint IN & BULK: %d",pPrivate->ed[LUETH_ENDPT_RX]); } else if ((UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT) && (UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK)) { pPrivate->ed[LUETH_ENDPT_TX] = ed->bEndpointAddress; DEBUG_TRACE("Endpoint OUT & BULK: %d", pPrivate->ed[LUETH_ENDPT_RX]); } else if ((UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN) && (UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) ) { pPrivate->ed[LUETH_ENDPT_INTR] = ed->bEndpointAddress; DEBUG_TRACE("Endpoint IN & INTR: %d", pPrivate->ed[LUETH_ENDPT_RX]); } } pPrivate->arpcom.ac_enaddr[0] = 0x00; pPrivate->arpcom.ac_enaddr[1] = 0xa5; pPrivate->arpcom.ac_enaddr[2] = ((unsigned int) pPrivate & 0xFF000000) >> 24; pPrivate->arpcom.ac_enaddr[3] = ((unsigned int) pPrivate & 0x00FF0000) >> 16; pPrivate->arpcom.ac_enaddr[4] = ((unsigned int) pPrivate & 0x0000FF00) >> 8; pPrivate->arpcom.ac_enaddr[5] = ((unsigned int) pPrivate & 0x000000FF) >> 0; pPrivate->arpcom.ac_enaddr[0] &= 0xfe; DEBUG_TRACE("lueth%d: Ethernet address: %6D", pPrivate->unit, pPrivate->arpcom.ac_enaddr, ":"); ifp = &pPrivate->arpcom.ac_if; ifp->if_softc = pPrivate; ifp->if_unit = pPrivate->unit; ifp->if_name = "lueth"; ifp->if_mtu = ETHERMTU; ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = lueth_if_init; ifp->if_start = lueth_if_start; ifp->if_watchdog = lueth_if_watchdog; ifp->if_ioctl = lueth_if_ioctl; ifp->if_output = ether_output; ifp->if_baudrate = 10000000; ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; lueth_qdat.ifp = ifp; lueth_qdat.if_rxstart = lueth_if_rxstart; #if defined(FREEBSD_4) ether_ifattach(ifp, ETHER_BPF_SUPPORTED); #elif defined(FREEBSD_5) ether_ifattach(ifp, pPrivate->arpcom.ac_enaddr); #else #error Huh? #endif usb_register_netisr(); pPrivate->gone = 0; splx(s); DEBUG_RETURN("%s","success"); USB_ATTACH_SUCCESS_RETURN; } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static int lueth_detach(dev) device_t dev; { plueth_softc_t pPrivate; struct ifnet *ifp; int s; DEBUG_PARMS("dev: %p",dev); s = splusb(); pPrivate = device_get_softc(dev); ifp = &pPrivate->arpcom.ac_if; pPrivate->gone = 1; if (ifp != NULL) #if defined(FREEBSD_4) ether_ifdetach(ifp, ETHER_BPF_SUPPORTED); #elif defined(FREEBSD_5) ether_ifdetach(ifp); #else #error Huh? #endif if (pPrivate->ep[LUETH_ENDPT_TX] != NULL) usbd_abort_pipe(pPrivate->ep[LUETH_ENDPT_TX]); if (pPrivate->ep[LUETH_ENDPT_RX] != NULL) usbd_abort_pipe(pPrivate->ep[LUETH_ENDPT_RX]); if (pPrivate->ep[LUETH_ENDPT_INTR] != NULL) usbd_abort_pipe(pPrivate->ep[LUETH_ENDPT_INTR]); #if 0 if (pPrivate->mcfilters != NULL) free(pPrivate->mcfilters, M_USBDEV); #endif splx(s); usbdebug = 0; DEBUG_RETURN("%d",0); return(0); } /*--------------------------------------------------------------------------* * *--------------------------------------------------------------------------*/ Static void lueth_shutdown(dev) device_t dev; { plueth_softc_t pPrivate; DEBUG_PARMS("dev: %p",dev); pPrivate = device_get_softc(dev); _lueth_stop(pPrivate); DEBUG_RETURN("%s","void"); return; } Static device_method_t lueth_methods[] = { DEVMETHOD(device_probe, lueth_match), DEVMETHOD(device_attach, lueth_attach), DEVMETHOD(device_detach, lueth_detach), DEVMETHOD(device_shutdown, lueth_shutdown), { 0, 0 } }; Static driver_t lueth_driver = { "lueth", lueth_methods, sizeof(lueth_softc_t) }; DRIVER_MODULE(if_lueth,uhub,lueth_driver,lueth_devclass,usbd_driver_load,0); --------------88CC297AF3B3D9A9802D2732 Content-Type: text/plain; charset=us-ascii; name="Makefile" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile" # $FreeBSD: src/sys/modules/lueth/Makefile,v 1.2 2000/01/28 11:26:30 bde Exp $ S = ${.CURDIR}/../.. .PATH: $S/dev/usb KMOD = if_lueth SRCS = if_lueth.c SRCS += opt_bdg.h opt_usb.h device_if.h bus_if.h miibus_if.h .include reload: -@make clean -@make -@make install -@kldunload if_lueth -@sleep 1 -@logger test -@kldload if_lueth config: -@ifconfig lueth0 192.168.0.201 netmask 255.255.255.0 --------------88CC297AF3B3D9A9802D2732-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message