Re: Reducing the verbosity of inserting a USB storage device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 20 Sep 2009, Matthew Wilcox wrote:

> The current kernel is very verbose when you insert a new USB storage
> device:
> 
> usb 1-2: new high speed USB device using ehci_hcd and address 9
> usb 1-2: configuration #1 chosen from 1 choice
> scsi4 : SCSI emulation for USB Mass Storage devices
> usb-storage: device found at 9
> usb-storage: waiting for device to settle before scanning
> usb-storage: device scan complete
> scsi 4:0:0:0: Direct-Access     GENERIC  USB DISK DEVICE  0100 PQ: 0 ANSI: 0 CCS
> sd 4:0:0:0: Attached scsi generic sg2 type 0
> sd 4:0:0:0: [sdc] 15728128 512-byte hardware sectors: (8.05 GB/7.49 GiB)
> sd 4:0:0:0: [sdc] Write Protect is off
> sd 4:0:0:0: [sdc] Mode Sense: 00 12 00 00
> sd 4:0:0:0: [sdc] Assuming drive cache: write through
> sd 4:0:0:0: [sdc] Assuming drive cache: write through
>  sdc:
> sd 4:0:0:0: [sdc] Attached SCSI removable disk
> 
> I think we can print a bit less information, and format it more densely.
> With the following three patches, my kernel prints:
> 
> usb 1-4: new high speed USB device using ehci_hcd and address 5
> usb 1-4: configuration #1 chosen from 1 choice
> scsi 6:0:0:0: Direct-Access              Flash Disk       5.00 PQ: 0 ANSI: 2
> sd 6:0:0:0: Attached scsi generic sg1 type 0
> sd 6:0:0:0: [sdb] Assuming drive cache: write through
> sd 6:0:0:0: [sdb] 2009088 512-byte logical blocks: (1.02 GB/981 MiB)
> sd 6:0:0:0: [sdb] Removable disk, Write Protect is off
>  sdb: unknown partition table
> 
> which doesn't take up nearly as much of my syslog ;-)

I approve of these changes in general, but there should be one more
line of information.  In the "after" example, there's nothing to relate
the USB device mentioned in the first two lines with the SCSI device
mentioned in the remaining six.  I'd like to see one line in between
from usb-storage, to indicate which USB interface is being registered
as which SCSI host.

We don't print anything quite like that right now, so this would have 
to be something new.  The closest we come is the "scsi4 : SCSI 
emulation for USB Mass Storage devices" line, and it doesn't mention 
the USB interface.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux