Re: strange scsi/CAM related dmesg output

From: Scott Long <scottl_at_samsco.org>
Date: Sat, 5 Jun 2010 14:04:02 -0600
On Jun 5, 2010, at 1:12 PM, Alexander Best wrote:
> sure. sorry.
> 
> the output
> 
> ada0 at ahcich2 bus 0 scbus3 target 0 lun 0
> ada0: <SAMSUNG SP2504C VT100-50> ATA-7 SATA 2.x device
> ada0: 300.000MB/s transferscd0 at ata2 bus 0 scbus2 target 0 lun 0
> cd0: <HL-DT-ST DVDRAM GSA-H10N JL12> Removable CD-ROM SCSI-0 device
> cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
> cd0: cd present [1944656 x 2048 byte records]
> (SATA 2.x, UDMA6, PIO 8192bytes)
> ada0: Command Queueing enabled
> ada0: 238474MB (488395055 512 byte sectors: 16H 63S/T 16383C
> 
> should actually look like this:
> 
> ada0 at ahcich2 bus 0 scbus3 target 0 lun 0
> ada0: <SAMSUNG SP2504C VT100-50> ATA-7 SATA 2.x device
> ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
> cd0 at ata2 bus 0 scbus2 target 0 lun 0
> cd0: <HL-DT-ST DVDRAM GSA-H10N JL12> Removable CD-ROM SCSI-0 device
> cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
> cd0: cd present [1944656 x 2048 byte records]
> ada0: Command Queueing enabled
> ada0: 238474MB (488395055 512 byte sectors: 16H 63S/T 16383C
> 
> cheers.
> 
> 

The attribute print code in /sys/cam/ata/ata_xpt.c purposely prints a partial line without a <CR>, with the expectation that the rest will be printed immediately after it.  It probably gets interrupted to print the other device detection; I thought that all of this got single-threaded through the camisr, but maybe not.  Anyways, the quick fix is to print these attributes into a sprintf buffer first, then splat that buffer out once its complete.

Scott
Received on Sat Jun 05 2010 - 18:04:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:04 UTC