2005-12-13 18:23:10

by Ben Collins

[permalink] [raw]
Subject: [PATCH 0/2] Sync Ubuntu patches

The following changes are found in the git repository at:

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/bcollins/ubuntu-2.6.git#for-linus

Ben Collins:
asus_acpi: Invert read of wled proc file to show correct state of LED.
ide/sis5513: Add support for 965 chipset

drivers/acpi/asus_acpi.c | 10 +++++-----
drivers/ide/pci/sis5513.c | 8 +++++++-
include/linux/pci_ids.h | 1 +
3 files changed, 13 insertions(+), 6 deletions(-)


2005-12-13 18:23:59

by Ben Collins

[permalink] [raw]
Subject: [PATCH 1/2] asus_acpi: Invert read of wled proc file to show correct state of LED.

User with this equipment stated that writes to this file worked correctly,
but that reads were showing inverted state (1 for off, 0 for on).
Following the same style for reads, introduced an invert flag to read_led,
and used it for wled.

Signed-off-by: Ben Collins <[email protected]>

---

drivers/acpi/asus_acpi.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

applies-to: f7e55af855531331113cbddb98688f3901d48425
d23291aeab378d85b93eda31f043a41449a5b474
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index fec895a..20e53c4 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -490,13 +490,13 @@ proc_read_info(char *page, char **start,
*/

/* Generic LED functions */
-static int read_led(const char *ledname, int ledmask)
+static int read_led(const char *ledname, int ledmask, int invert)
{
if (ledname) {
int led_status;

if (read_acpi_int(NULL, ledname, &led_status))
- return led_status;
+ return (invert) ? !led_status : led_status;
else
printk(KERN_WARNING "Asus ACPI: Error reading LED "
"status\n");
@@ -552,7 +552,7 @@ proc_read_mled(char *page, char **start,
void *data)
{
return sprintf(page, "%d\n",
- read_led(hotk->methods->mled_status, MLED_ON));
+ read_led(hotk->methods->mled_status, MLED_ON, 0));
}

static int
@@ -570,7 +570,7 @@ proc_read_wled(char *page, char **start,
void *data)
{
return sprintf(page, "%d\n",
- read_led(hotk->methods->wled_status, WLED_ON));
+ read_led(hotk->methods->wled_status, WLED_ON, 1));
}

static int
@@ -588,7 +588,7 @@ proc_read_tled(char *page, char **start,
void *data)
{
return sprintf(page, "%d\n",
- read_led(hotk->methods->tled_status, TLED_ON));
+ read_led(hotk->methods->tled_status, TLED_ON, 0));
}

static int
---
0.99.9k


2005-12-13 18:25:06

by Ben Collins

[permalink] [raw]
Subject: [PATCH 2/2] ide/sis5513: Add support for 965 chipset

Tested by Ubuntu user.

http://bugzilla.ubuntu.com/17236

Signed-off-by: Ben Collins <[email protected]>

---

drivers/ide/pci/sis5513.c | 8 +++++++-
include/linux/pci_ids.h | 1 +
2 files changed, 8 insertions(+), 1 deletions(-)

applies-to: a3b21d3b4c1fc36a94b3ffd9e722254ea2a8a950
3f0c8c36457e8f67471e1d0432f8cc1c5a6bedac
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 75a2253..c838648 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -766,7 +766,7 @@ static unsigned int __devinit init_chips
pci_read_config_word(dev, PCI_DEVICE_ID, &trueid);
pci_write_config_dword(dev, 0x54, idemisc);

- if (trueid == 0x5518) {
+ if (trueid == PCI_DEVICE_ID_SI_5518) {
printk(KERN_INFO "SIS5513: SiS 962/963 MuTIOL IDE UDMA133 controller\n");
chipset_family = ATA_133;

@@ -779,6 +779,11 @@ static unsigned int __devinit init_chips
printk(KERN_INFO "SIS5513: Switching to 5513 register mapping\n");
}
}
+
+ if (trueid == PCI_DEVICE_ID_SI_180) {
+ chipset_family = ATA_133;
+ printk(KERN_INFO "SIS5513: SiS 965 IDE UDMA133 controller\n");
+ }
}

if (!chipset_family) { /* Belongs to pci-quirks */
@@ -953,6 +958,7 @@ static int __devinit sis5513_init_one(st
static struct pci_device_id sis5513_pci_tbl[] = {
{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5518, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_180, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, sis5513_pci_tbl);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 1e737e2..724a98e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -581,6 +581,7 @@
#define PCI_DEVICE_ID_SI_ACPI 0x0009
#define PCI_DEVICE_ID_SI_SMBUS 0x0016
#define PCI_DEVICE_ID_SI_LPC 0x0018
+#define PCI_DEVICE_ID_SI_180 0x0180
#define PCI_DEVICE_ID_SI_5597_VGA 0x0200
#define PCI_DEVICE_ID_SI_6205 0x0205
#define PCI_DEVICE_ID_SI_501 0x0406
---
0.99.9k


Subject: Re: [PATCH 2/2] ide/sis5513: Add support for 965 chipset

Hi,

SiS965 support has been merged recently (different patch because
sis5513_pci_tbl[] chunk of this patch causes problems on the real
SiS180 controller).

Please ask the user to test vanilla 2.6.15-rc5.

Thanks,
Bartlomiej

On 12/13/05, Ben Collins <[email protected]> wrote:
> Tested by Ubuntu user.
>
> http://bugzilla.ubuntu.com/17236
>
> Signed-off-by: Ben Collins <[email protected]>

2005-12-13 19:30:47

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 2/2] ide/sis5513: Add support for 965 chipset

On Tue, 2005-12-13 at 19:38 +0100, Bartlomiej Zolnierkiewicz wrote:
> Hi,
>
> SiS965 support has been merged recently (different patch because
> sis5513_pci_tbl[] chunk of this patch causes problems on the real
> SiS180 controller).
>
> Please ask the user to test vanilla 2.6.15-rc5.

This patch was against 2.6.15-rc5.

--
Ben Collins <[email protected]>
Developer
Ubuntu Linux

Subject: Re: [PATCH 2/2] ide/sis5513: Add support for 965 chipset

On 12/13/05, Ben Collins <[email protected]> wrote:
> On Tue, 2005-12-13 at 19:38 +0100, Bartlomiej Zolnierkiewicz wrote:
> > Hi,
> >
> > SiS965 support has been merged recently (different patch because
> > sis5513_pci_tbl[] chunk of this patch causes problems on the real
> > SiS180 controller).
> >
> > Please ask the user to test vanilla 2.6.15-rc5.
>
> This patch was against 2.6.15-rc5.

The original bug was filled against 2.6.12-9-amd64-k8 and then
reported to work with this patch with 2.6.14-something (probably,
because the exact kernel version is not mentioned in the bugzilla).

Were you able to reproduce the problem with 2.6.15-rc5?

BTW please use [email protected] for ATA stuff

Thanks,
Bartlomiej

2005-12-13 20:41:37

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 2/2] ide/sis5513: Add support for 965 chipset

On Tue, 2005-12-13 at 20:57 +0100, Bartlomiej Zolnierkiewicz wrote:
> On 12/13/05, Ben Collins <[email protected]> wrote:
> > On Tue, 2005-12-13 at 19:38 +0100, Bartlomiej Zolnierkiewicz wrote:
> > > Hi,
> > >
> > > SiS965 support has been merged recently (different patch because
> > > sis5513_pci_tbl[] chunk of this patch causes problems on the real
> > > SiS180 controller).
> > >
> > > Please ask the user to test vanilla 2.6.15-rc5.
> >
> > This patch was against 2.6.15-rc5.
>
> The original bug was filled against 2.6.12-9-amd64-k8 and then
> reported to work with this patch with 2.6.14-something (probably,
> because the exact kernel version is not mentioned in the bugzilla).
>
> Were you able to reproduce the problem with 2.6.15-rc5?

No, but the useful bits were nowhere to be found, so I figured that it
still applied.

> BTW please use [email protected] for ATA stuff

Sure thing.

--
Ben Collins <[email protected]>
Developer
Ubuntu Linux

Subject: Re: [PATCH 2/2] ide/sis5513: Add support for 965 chipset

On 12/13/05, Ben Collins <[email protected]> wrote:
> On Tue, 2005-12-13 at 20:57 +0100, Bartlomiej Zolnierkiewicz wrote:
> > On 12/13/05, Ben Collins <[email protected]> wrote:
> > > On Tue, 2005-12-13 at 19:38 +0100, Bartlomiej Zolnierkiewicz wrote:
> > > > Hi,
> > > >
> > > > SiS965 support has been merged recently (different patch because
> > > > sis5513_pci_tbl[] chunk of this patch causes problems on the real
> > > > SiS180 controller).
> > > >
> > > > Please ask the user to test vanilla 2.6.15-rc5.
> > >
> > > This patch was against 2.6.15-rc5.
> >
> > The original bug was filled against 2.6.12-9-amd64-k8 and then
> > reported to work with this patch with 2.6.14-something (probably,
> > because the exact kernel version is not mentioned in the bugzilla).
> >
> > Were you able to reproduce the problem with 2.6.15-rc5?
>
> No, but the useful bits were nowhere to be found, so I figured that it
> still applied.

The useful bits are here:
http://kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-2.6.git;a=commitdiff;h=14351f8e573442e2437d4b177fa10075aaefd5c9;hp=4f1d774aadfc5a6ed1545dca180f66ab6d0f543d

The author of the patch that you are submitting confirmed that a new
patch works for him and suggested that it should be used instead of
the original patch (because it conflicts with sata_sis driver as it claims
the wrong PCI device).

Bartlomiej

2005-12-13 23:40:14

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 2/2] ide/sis5513: Add support for 965 chipset

On Tue, 2005-12-13 at 22:06 +0100, Bartlomiej Zolnierkiewicz wrote:
> The useful bits are here:
> http://kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-2.6.git;a=commitdiff;h=14351f8e573442e2437d4b177fa10075aaefd5c9;hp=4f1d774aadfc5a6ed1545dca180f66ab6d0f543d
>
> The author of the patch that you are submitting confirmed that a new
> patch works for him and suggested that it should be used instead of
> the original patch (because it conflicts with sata_sis driver as it claims
> the wrong PCI device).

Thanks for pointing this out. Reverting out of both my tree's.

--
Ben Collins <[email protected]>
Developer
Ubuntu Linux