mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: HDIO_SCAN_HWIF causes hwif to "forget" PCI parent
Date: Sat, 8 Apr 2006 00:30:06 +0400	[thread overview]
Message-ID: <200604080030.07236.arvidjaar@mail.ru> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have notebook with ALi IDE interface:

00:04.0 IDE interface: ALi Corporation M5229 IDE (rev c3)

One of scripts called on Mandriva during suspend/resume calls hdparm -U for 
hdc on suspend and hdparm -R on resume.

Now, hdparm -U (HDIO_UNREGISTER_HWIF) completely wipes out hwif reinitializing 
it. It means, that also hwif->pci_dev is nulled. On hdparm -R 
(HDIO_SCAN_HWIF) it basically calls hwif_register without initializing 
pci_dev which means hdc appears in sysfs in different place:

before

lrwxrwxrwx  1 root root 0 Apr  7 23:53 /sys/block/hdc/device 
- -> ../../devices/pci0000:00/0000:00:04.0/ide1/1.0/

after

lrwxrwxrwx  1 root root 0 Apr  7 23:53 /sys/block/hdc/device 
- -> ../../devices/ide1/1.0/

this slightly confuses udev that receives a new path and regenerates cdrom 
links (OK this is no more kernel problem but how I noticed it in the first 
place :) so what has been cdrom0 before suddenly becomes cdrom1.

Looking at ide.c, I do not see any obvious ways to fix it. I appreciate any 
hint how this can be fixed; alternatively if libpata does not have this issue 
I am ready to test it.

Thank you

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFENsvPR6LMutpd94wRAjFNAJ0VsKOZZOKn6/SIilrblrXuj4eGhgCePEnm
VP+KZQOGbpye9esLG6lSC/k=
=VXbN
-----END PGP SIGNATURE-----

             reply	other threads:[~2006-04-07 20:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-07 20:30 Andrey Borzenkov [this message]
2006-04-12 14:30 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200604080030.07236.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome