Re: atacontrol kernel crash (atausb?)
* M. Warner Losh <[EMAIL PROTECTED]> wrote: > In message: <[EMAIL PROTECTED]> > Hans Petter Selasky <[EMAIL PROTECTED]> writes: > : Instead of having all these quirks, isn't it possible that the SCSI layer > can > : auto-probe this? > > The short answer is no. There's no reliable way to tell if a device > supports a given scsi command, and some devices freak out (lock up) > when sent one. Well, in one of the scenario's there is. USB UFI devices never support synchronize. -- Ed Schouten <[EMAIL PROTECTED]> WWW: http://g-rave.nl/ pgpLVAqP4Lhxd.pgp Description: PGP signature
Re: atacontrol kernel crash (atausb?)
In message: <[EMAIL PROTECTED]> Hans Petter Selasky <[EMAIL PROTECTED]> writes: : Instead of having all these quirks, isn't it possible that the SCSI layer can : auto-probe this? The short answer is no. There's no reliable way to tell if a device supports a given scsi command, and some devices freak out (lock up) when sent one. Warner ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: atacontrol kernel crash (atausb?)
On Wed, Jan 24, 2007 at 12:54:51PM +0100, Hans Petter Selasky wrote: > On Wednesday 24 January 2007 12:38, Ed Schouten wrote: > > Hello, > > > > * Pietro Cerutti <[EMAIL PROTECTED]> wrote: > > > On 1/15/07, Hans Petter Selasky <[EMAIL PROTECTED]> wrote: > > > >No. What happens when you use/load "umass" and unload "atausb" ? > > > > > > Everything works nice with umass. It creates the da0 device node. > > > It just shows up these errors, as it always did... > > > GEOM: new disk da0 > > > da0 at umass-sim0 bus 0 target 0 lun 0 > > > da0: < USB2.0 FlashDisk 1.1b> Removable Direct Access SCSI-0 device > > > da0: Serial Number > > > da0: 40.000MB/s transfers > > > da0: 248MB (507904 512 byte sectors: 64H 32S/T 248C) > > > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > > > status == 0x0 > > > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > > > status == 0x0 > > > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > > > status == 0x0 > > > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > > > status == 0x0 > > > > I had these messages with two other devices before, an MP3 player and a > > USB floppy drive. I fixed these errors by adding a quirk to > > /sys/cam/scsi/scsi_da.c. > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=97174 > > http://www.freebsd.org/cgi/query-pr.cgi?pr=107101 > > Instead of having all these quirks, isn't it possible that the SCSI layer can > auto-probe this? No - it is intended to fail on devices not supporting the commands. And the user should know if a drive has not been synced befor unplugging it from power. The SCSI Layer could ask if the device has a cache at least, but I this would likely just relocate the problem. Issuing unsupported commands should be harmless for any sane device, but often bad implemented devices just hang on unknown commands. IIRC umass specification has a way to distinguish reduced command set flash type from generic SCSI devices, by interpreting the subclass. That way umass could safely catch such commands. -- B.Walterhttp://www.bwct.de http://www.fizon.de [EMAIL PROTECTED] [EMAIL PROTECTED][EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: atacontrol kernel crash (atausb?)
Hello, * Pietro Cerutti <[EMAIL PROTECTED]> wrote: > On 1/15/07, Hans Petter Selasky <[EMAIL PROTECTED]> wrote: > > > >No. What happens when you use/load "umass" and unload "atausb" ? > Everything works nice with umass. It creates the da0 device node. > It just shows up these errors, as it always did... > GEOM: new disk da0 > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: < USB2.0 FlashDisk 1.1b> Removable Direct Access SCSI-0 device > da0: Serial Number > da0: 40.000MB/s transfers > da0: 248MB (507904 512 byte sectors: 64H 32S/T 248C) > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > status == 0x0 > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > status == 0x0 > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > status == 0x0 > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > status == 0x0 I had these messages with two other devices before, an MP3 player and a USB floppy drive. I fixed these errors by adding a quirk to /sys/cam/scsi/scsi_da.c. http://www.freebsd.org/cgi/query-pr.cgi?pr=97174 http://www.freebsd.org/cgi/query-pr.cgi?pr=107101 -- Ed Schouten <[EMAIL PROTECTED]> WWW: http://g-rave.nl/ pgpimVRTQcDXG.pgp Description: PGP signature
Re: atacontrol kernel crash (atausb?)
On Wednesday 24 January 2007 12:38, Ed Schouten wrote: > Hello, > > * Pietro Cerutti <[EMAIL PROTECTED]> wrote: > > On 1/15/07, Hans Petter Selasky <[EMAIL PROTECTED]> wrote: > > >No. What happens when you use/load "umass" and unload "atausb" ? > > > > Everything works nice with umass. It creates the da0 device node. > > It just shows up these errors, as it always did... > > GEOM: new disk da0 > > da0 at umass-sim0 bus 0 target 0 lun 0 > > da0: < USB2.0 FlashDisk 1.1b> Removable Direct Access SCSI-0 device > > da0: Serial Number > > da0: 40.000MB/s transfers > > da0: 248MB (507904 512 byte sectors: 64H 32S/T 248C) > > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > > status == 0x0 > > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > > status == 0x0 > > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > > status == 0x0 > > (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi > > status == 0x0 > > I had these messages with two other devices before, an MP3 player and a > USB floppy drive. I fixed these errors by adding a quirk to > /sys/cam/scsi/scsi_da.c. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=97174 > http://www.freebsd.org/cgi/query-pr.cgi?pr=107101 Instead of having all these quirks, isn't it possible that the SCSI layer can auto-probe this? --HPS ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: atacontrol kernel crash (atausb?)
On 1/15/07, Hans Petter Selasky <[EMAIL PROTECTED]> wrote: > last one: why atausb doesn't have a manual page?? Probably the device driver is too new. Maybe we should adopt the OpenBSD's "everything not documented is a bug" philosophy, don't you think? So, anyone knows how to use atausb? Thanx, --HPS -- Pietro Cerutti ICQ: 117293691 PGP: 0x9571F78E - ASCII Ribbon Campaign - against HTML e-mail and proprietary attachments www.asciiribbon.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: atacontrol kernel crash (atausb?)
On 1/15/07, Hans Petter Selasky <[EMAIL PROTECTED]> wrote: No. What happens when you use/load "umass" and unload "atausb" ? Everything works nice with umass. It creates the da0 device node. It just shows up these errors, as it always did... GEOM: new disk da0 da0 at umass-sim0 bus 0 target 0 lun 0 da0: < USB2.0 FlashDisk 1.1b> Removable Direct Access SCSI-0 device da0: Serial Number da0: 40.000MB/s transfers da0: 248MB (507904 512 byte sectors: 64H 32S/T 248C) (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0 --HPS -- Pietro Cerutti ICQ: 117293691 PGP: 0x9571F78E - ASCII Ribbon Campaign - against HTML e-mail and proprietary attachments www.asciiribbon.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: atacontrol kernel crash (atausb?)
On Monday 15 January 2007 16:54, Pietro Cerutti wrote: > On 1/15/07, Hans Petter Selasky <[EMAIL PROTECTED]> wrote: > > It is just plug and play. If you don't get any new USB devices like > > /dev/adXX after that you plug the device, then maybe there is something > > wrong or the protocol used is not supported by atausb. > > This is the only thing showing on the console: > > atausb0: using SCSI over Bulk-Only > ata2: on atausb0 > > Can you see anything wrong with it? No. What happens when you use/load "umass" and unload "atausb" ? > > > PS: You maybe want to try out my new and rewritten USB stack + atausb: > > Tried, nothing changed... what functionality is your patch supposed to add? No new functionality with regard to atausb. --HPS ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: atacontrol kernel crash (atausb?)
On 1/15/07, Hans Petter Selasky <[EMAIL PROTECTED]> wrote: It is just plug and play. If you don't get any new USB devices like /dev/adXX after that you plug the device, then maybe there is something wrong or the protocol used is not supported by atausb. This is the only thing showing on the console: atausb0: using SCSI over Bulk-Only ata2: on atausb0 Can you see anything wrong with it? PS: You maybe want to try out my new and rewritten USB stack + atausb: Tried, nothing changed... what functionality is your patch supposed to add? -- Pietro Cerutti ICQ: 117293691 PGP: 0x9571F78E - ASCII Ribbon Campaign - against HTML e-mail and proprietary attachments www.asciiribbon.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: atacontrol kernel crash (atausb?)
On Monday 15 January 2007 15:37, Pietro Cerutti wrote: > On 1/15/07, Hans Petter Selasky <[EMAIL PROTECTED]> wrote: > > > last one: why atausb doesn't have a manual page?? > > > > Probably the device driver is too new. > > Maybe we should adopt the OpenBSD's "everything not documented is a > bug" philosophy, don't you think? > > So, anyone knows how to use atausb? It is just plug and play. If you don't get any new USB devices like /dev/adXX after that you plug the device, then maybe there is something wrong or the protocol used is not supported by atausb. PS: You maybe want to try out my new and rewritten USB stack + atausb: # # How to get the latest sources: (you need subversion installed) # svn --username anonsvn --password anonsvn \ checkout svn://svn.turbocat.net/i4b # # The following commands will # install the driver on FreeBSD: # cd i4b/trunk/i4b/FreeBSD.usb make S=../src package make install # # Then build a new kernel. # --HPS ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: atacontrol kernel crash (atausb?)
On Monday 15 January 2007 12:22, Pietro Cerutti wrote: > Hello, > this is a reproducible kernel page-fault crash on stable as of 1h ago: > > FreeBSD gahrtop.localhost 6.2-STABLE FreeBSD 6.2-STABLE #4: Mon Jan 15 > 11:24:56 CET 2007 > [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GAHRTOP i386 > > 1) atacontrol list > ATA channel 0: > Master: ad0 Serial ATA v1.0 > Slave: no device present > ATA channel 1: > Master: no device present > Slave: acd0 ATA/ATAPI revision 5 > > 2) -> plug in USB stick (microspot 256MB USB2.0) > > 3) atacontrol list > ATA channel 0: > Master: ad0 Serial ATA v1.0 > Slave: no device present > ATA channel 1: > Master: no device present > Slave: acd0 ATA/ATAPI revision 5 > ATA channel 2: > Master: no device present > Slave: no device present > > 4) atacontrol attach ata2 This is a known issue that SOS should fix. If you look into the code of "ata_attach()" you will see that it tries to do things that are not allowed by USB devices, like allocating an IRQ: int ata_attach(device_t dev) { struct ata_channel *ch = device_get_softc(dev); int error, rid; /* check that we have a virgin channel to attach */ if (ch->r_irq) return EEXIST; /* initialize the softc basics */ ch->dev = dev; ch->state = ATA_IDLE; bzero(&ch->state_mtx, sizeof(struct mtx)); mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF); bzero(&ch->queue_mtx, sizeof(struct mtx)); mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF); TAILQ_INIT(&ch->ata_queue); /* reset the controller HW, the channel and device(s) */ while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) tsleep(&error, PRIBIO, "ataatch", 1); ATA_RESET(dev); ATA_LOCKING(dev, ATA_LF_UNLOCK); /* setup interrupt delivery */ rid = ATA_IRQ_RID; ch->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (!ch->r_irq) { device_printf(dev, "unable to allocate interrupt\n"); return ENXIO; } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, (driver_intr_t *)ata_interrupt, ch, &ch->ih))) { device_printf(dev, "unable to setup interrupt\n"); return error; } /* probe and attach devices on this channel unless we are in early boot */ if (!ata_delayed_attach) ata_identify(dev); return 0; } Same with "ata_detach()". > > last one: why atausb doesn't have a manual page?? Probably the device driver is too new. --HPS ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
atacontrol kernel crash (atausb?)
Hello, this is a reproducible kernel page-fault crash on stable as of 1h ago: FreeBSD gahrtop.localhost 6.2-STABLE FreeBSD 6.2-STABLE #4: Mon Jan 15 11:24:56 CET 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GAHRTOP i386 1) atacontrol list ATA channel 0: Master: ad0 Serial ATA v1.0 Slave: no device present ATA channel 1: Master: no device present Slave: acd0 ATA/ATAPI revision 5 2) -> plug in USB stick (microspot 256MB USB2.0) 3) atacontrol list ATA channel 0: Master: ad0 Serial ATA v1.0 Slave: no device present ATA channel 1: Master: no device present Slave: acd0 ATA/ATAPI revision 5 ATA channel 2: Master: no device present Slave: no device present 4) atacontrol attach ata2 Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x24 fault code = supervisor read, page not present instruction pointer = 0x20:0xc050d8fa stack pointer = 0x28:0xe8fd2bb8 frame pointer = 0x28:0xe8fd2bb8 code segment = base 0x0, limit 0xf, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process= 900 (atacontrol) trap number = 12 panic: page fault cpuid = 0 Uptime = 5m46s Physical memory: 2031 MB Dumping 63 MB: at this point nothing more appens. I have set debug.minidump=1 so maybe this could be the cause for the RAM not to be dumped. Furthermore, I read " The atacontrol utility can cause severe system crashes and loss of data if used improperly. Please exercise caution when using this command! " from the atacontrol(8) manual page, so maybe it's just me doing something wrong. If it's the case, how can I scan for the just-plugged-in USB disk using the atausb driver? No device appears in /dev last one: why atausb doesn't have a manual page?? Thanx, -- Pietro Cerutti ICQ: 117293691 PGP: 0x9571F78E - ASCII Ribbon Campaign - against HTML e-mail and proprietary attachments www.asciiribbon.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"