lkml.org 
[lkml]   [2008]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/7] disable broadcomm legacy boot interrupt generation
On Mon, 2 Jun 2008, Olaf Dabrunz wrote:
> /*
> + * disabled boot interrupts on HT-1000
> + */
> +static void quirk_disable_broadcom_boot_interrupt(struct pci_dev *dev)
> +{
> + u32 feature_enable;
> + u32 saved_feature_enable;

u32 a,b;

> + u8 irq;
> +
> + if (nobootirqquirk)
> + return;
> +
> + pci_read_config_dword(dev, 0x64,
> + &feature_enable);

one line.

Can we please have a useful constant for 0x64 ?

> + saved_feature_enable = feature_enable;
> + feature_enable |= (1<<0);

What does (1<<0) ? Please use a #define with a understandable name.

> + pci_write_config_dword(dev, 0x64, feature_enable);

pci_write_config_dword(dev, 0x64, feature_enable | WHATEVERTHISMEANS);

That way you dont need an extra variable.

> + for (irq = 0x10; irq < 0x10 + 32; irq++) {
> + outb(irq, 0xC00);
> + outb(0x00, 0xC01);

#defines for magic port constants please

> + }
> +
> + pci_write_config_dword(dev, 0x64, saved_feature_enable);
> +
> + printk(KERN_INFO "disabled boot interrupts on PCI device 0x%04x:0x%04x\n",
> + dev->vendor, dev->device);
> +}
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000SB, quirk_disable_broadcom_boot_interrupt);
> +
> +/*
> * On some chipsets we can disable the generation of legacy INTx boot
> * interrupts.
> */
> --
> 1.5.2.4
>
> --
> Olaf Dabrunz (od/odabrunz), SUSE Linux Products GmbH, N??rnberg
>


\
 
 \ /
  Last update: 2008-06-03 12:49    [W:0.240 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site