RE: [PATCH] Add MSI support to sata_vsc driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok,
Here's my latest attempt.  I've added a new vsc_sata_host_priv data
structure (basically copied from the sata_mv driver) which has an
hp_flags bitfield with a bit to indicate whether MSI is being used.
This is used in the new vsc_sata_host_stop() routine to call
pci_disable_msi() if MSI is on, pci_intx() if not.

I'm still wondering if the pci_intx() stuff is needed; some SATA drivers
use it, some don't.  The intx disable bit was not set before when I had
MSI running, but it didn't seem to cause any problems, but it's still
probably good practice to set it when using MSI.  But is it needed when
in INTX mode?  Some drivers use it in the init_one() function, some
don't.

I've compiled this driver as a module and loaded and unloaded it to
verify that it indeed reuses the MSI interrupt instead of just
allocating a new one each time as it did with pci_disable_msi() missing.
However, one remaining problem (which I don't think has anything to do
with interrupts) is that when reloading the driver, it allocates all-new
port numbers:

ata5: SATA max UDMA/133 cmd 0x510A0200 ctl 0x510A0229 bmdma 0x510A0270
irq 131
ata6: SATA max UDMA/133 cmd 0x510A0400 ctl 0x510A0429 bmdma 0x510A0470
irq 131
ata7: SATA max UDMA/133 cmd 0x510A0600 ctl 0x510A0629 bmdma 0x510A0670
irq 131
ata8: SATA max UDMA/133 cmd 0x510A0800 ctl 0x510A0829 bmdma 0x510A0870
irq 131
scsi4 : sata_vsc
ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata5.00: ATA-6, max UDMA/133, 72303840 sectors: LBA48
ata5.00: ata5: dev 0 multi count 0
ata5.00: applying bridge limits
ata5.00: configured for UDMA/100
scsi5 : sata_vsc
ata6: SATA link down (SStatus 0 SControl 300)
ATA: abnormal status 0x7F on port 0x510A041C
scsi6 : sata_vsc
ata7: SATA link down (SStatus 0 SControl 300)
ATA: abnormal status 0x7F on port 0x510A061C
scsi7 : sata_vsc
ata8: SATA link down (SStatus 0 SControl 300)
ATA: abnormal status 0x7F on port 0x510A081C
  Vendor: ATA       Model: WDC WD360GD-00FN  Rev: 35.0
  Type:   Direct-Access                      ANSI SCSI revision: 05

These were 1-4 when I first loaded the driver.  I've never seen this
before, as I've never used this driver as a module before.

Anyway, here's the new patch.

Thanks again for all the help!
Dan


-----Original Message-----
From: Jeff Garzik [mailto:jeff@xxxxxxxxxx] 
Sent: Wednesday, August 23, 2006 11:56 PM
To: Wolstenholme, Daniel E
Cc: Jeremy Higdon; linux-ide@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] Add MSI support to sata_vsc driver

two issues remain:

1) matching pci_disable_msi() is missing

2) as I mentioned previously, do not explicitly initialize irq_flags to 
zero, they are already zero via memset(3).  Only initialize irq_flags 
for the case where pci_enable_msi() fails.

Attachment: diff.sata_vsc.2
Description: diff.sata_vsc.2


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux