2007-08-01 22:13:52

by Andrew Vasquez

[permalink] [raw]
Subject: [PATCH] qla2xxx: allocate enough space for the full PCI descriptor.

Signed-off-by: Andrew Vasquez <[email protected]>
---

On Thu, 26 Jul 2007, Andrew Vasquez wrote:

> On Thu, 26 Jul 2007, Andrew Patterson wrote:
>
> > On Thu, 2007-07-26 at 15:36 +0200, Ulrich Windl wrote:
> > > Hi,
> > >
> > > <6>QLogic Fibre Channel HBA Driver
> > > <6>GSI 49 (level, low) -> CPU 3 (0x0300) vector 51
> > > <6>ACPI: PCI Interrupt 0000:0f:01.0[A] -> GSI 49 (level, low) -> IRQ 51
> > > <6>qla2xxx 0000:0f:01.0: Found an ISP2422, irq 51, iobase 0xc0000000b0040000
> > > [...]
> > > <6>qla2xxx 0000:0f:01.0: LOOP UP detected (4 Gbps).
> > > <6>qla2xxx 0000:0f:01.0: Topology - (F_Port), Host Loop address 0x0
> > > <6>scsi0 : qla2xxx
> > > <6>qla2xxx 0000:0f:01.0:
> > > <4> QLogic Fibre Channel HBA Driver: 8.01.07-k3
> > > <4> QLogic HP AB378-60001 -
> > > <4> ISP2422: PCI-X Mode 2 (133 MH4.00.26 [IP] @ 0000:0f:01.0 hdma+, host#=0,
> > > fw=4.00.26 [IP]
>
> The 33/66/100/133 values refer to the bus-clock speed at which the
> card is operating. As is seen here (although a bit truncated --
> separate issue, I'll try to see if I can reproduce this on one of my
> HPQ rigs),

Ok, so what's happening here is the buffer passed in (pci_info)
does not have bytes allocated (off by 3).

James, please apply...

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 93c0c7e..acca898 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1564,7 +1564,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
struct Scsi_Host *host;
scsi_qla_host_t *ha;
unsigned long flags = 0;
- char pci_info[20];
+ char pci_info[30];
char fw_str[30];
struct scsi_host_template *sht;