public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* why disk info gets printk'ed twice?
@ 2007-10-22 21:37 Michael Tokarev
  2007-10-23  0:08 ` David Miller
  2007-10-23  0:13 ` Matthew Wilcox
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Tokarev @ 2007-10-22 21:37 UTC (permalink / raw)
  To: Linux-scsi

Every dmesg users provide contains double info
about identification of [scsi,ata,..] disk drives
found in the system.  Here's mine:

scsi 2:0:0:0: Direct-Access     ATA      ST3808110AS      n/a  PQ: 0 ANSI: 5
loading module sd_mod
sd 2:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sda] 156301488 512-byte hardware sectors (80026 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >
sd 2:0:0:0: [sda] Attached SCSI disk

Why the lines beginning with "sd 2:0:0:0:" gets duplicated?
Can this be fixed somehow?

All the messages are in drivers/scsi/sd_mod.c, printed out by
functions called from within sd_revalidate_disk().  This routine
gets called from two contexts:
 sd_store_cache_type(), which is a sysfs thing, it seems, and
 sd_probe(), which gets called from .probe method of scsi_driver

So it seems to me that scsi_driver.probe() method gets called
twice for some reason...

This question has been asked several times, but I don't recall
any answers to it.

Thanks.

/mjt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-23  0:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 21:37 why disk info gets printk'ed twice? Michael Tokarev
2007-10-23  0:08 ` David Miller
2007-10-23  0:13 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox