From: Jeff Garzik <jgarzik@pobox.com>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] sata_via broken by recent libata updates
Date: Wed, 24 Mar 2004 13:08:49 -0500 [thread overview]
Message-ID: <4061CEB1.3080600@pobox.com> (raw)
In-Reply-To: <20040324163340.GD23503@master.mivlgu.local>
[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]
Sergey Vlasov wrote:
> Hello!
>
> After updating from 2.4.25-libata1 to 2.4.25-libata9 the sata_via
> driver stopped working. The module loads and even seems to detect
> the presense of drives, but the SCSI-emulation devices are not
> registered:
[...]
> Seems that the problem is caused by changes in the device
> initialization - calling ata_device_add() from svia_init_one() does
> not work (at least with the 2.4.x SCSI layer). The following patch
> solves the initialization problem:
>
> --- kernel-source-2.4.25/drivers/scsi/sata_via.c.sata_via-init-fix 2004-03-22 14:03:31 +0300
> +++ kernel-source-2.4.25/drivers/scsi/sata_via.c 2004-03-24 16:27:50 +0300
> @@ -264,9 +264,7 @@ static int svia_init_one (struct pci_dev
>
> pci_set_master(pdev);
>
> - /* FIXME: check ata_device_add return value */
> - ata_device_add(probe_ent);
> - kfree(probe_ent);
> + ata_add_to_probe_list(probe_ent);
>
> return 0;
Ah, indeed. A bug in the 2.4 backport. Seems to be present in sata_sis
too.
Thanks for spotting, I just checked in the attached patch.
Jeff
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1464 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/03/24 13:07:52-05:00 jgarzik@redhat.com
# [libata] Fix probing bug in VIA, SiS drivers
#
# Some 2.6 code leaked into the 2.4 backport.
#
# Spotted by Sergey Vlasov.
#
# drivers/scsi/sata_via.c
# 2004/03/24 13:07:50-05:00 jgarzik@redhat.com +1 -3
# [libata] Fix probing bug in VIA, SiS drivers
#
# Some 2.6 code leaked into the 2.4 backport.
#
# Spotted by Sergey Vlasov.
#
# drivers/scsi/sata_sis.c
# 2004/03/24 13:07:50-05:00 jgarzik@redhat.com +1 -3
# [libata] Fix probing bug in VIA, SiS drivers
#
# Some 2.6 code leaked into the 2.4 backport.
#
# Spotted by Sergey Vlasov.
#
diff -Nru a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c
--- a/drivers/scsi/sata_sis.c Wed Mar 24 13:08:01 2004
+++ b/drivers/scsi/sata_sis.c Wed Mar 24 13:08:01 2004
@@ -182,9 +182,7 @@
pci_set_master(pdev);
pci_enable_intx(pdev);
- /* FIXME: check ata_device_add return value */
- ata_device_add(probe_ent);
- kfree(probe_ent);
+ ata_add_to_probe_list(probe_ent);
return 0;
diff -Nru a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c
--- a/drivers/scsi/sata_via.c Wed Mar 24 13:08:01 2004
+++ b/drivers/scsi/sata_via.c Wed Mar 24 13:08:01 2004
@@ -264,9 +264,7 @@
pci_set_master(pdev);
- /* FIXME: check ata_device_add return value */
- ata_device_add(probe_ent);
- kfree(probe_ent);
+ ata_add_to_probe_list(probe_ent);
return 0;
next prev parent reply other threads:[~2004-03-24 18:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-24 16:33 [BUG] sata_via broken by recent libata updates Sergey Vlasov
2004-03-24 18:08 ` Jeff Garzik [this message]
2004-03-24 21:19 ` Jeff Garzik
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=4061CEB1.3080600@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vsu@altlinux.ru \
/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