Skip to content

Commit 6fdb2ee

Browse files
author
Stefan Richter
committed
firewire: ohci: extend initialization log message
by the number of available isochronous DMA contexts and active quirks which is occasionally useful information. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
1 parent 4802f16 commit 6fdb2ee

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎drivers/firewire/ohci.c‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,7 @@ static int __devinit pci_probe(struct pci_dev *dev,
23292329
struct fw_ohci *ohci;
23302330
u32 bus_options, max_receive, link_speed, version;
23312331
u64 guid;
2332-
int i, err;
2332+
int i, err, n_ir, n_it;
23332333
size_t size;
23342334

23352335
ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
@@ -2370,8 +2370,6 @@ static int __devinit pci_probe(struct pci_dev *dev,
23702370
goto fail_iomem;
23712371
}
23722372

2373-
version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
2374-
23752373
for (i = 0; i < ARRAY_SIZE(ohci_quirks); i++)
23762374
if (ohci_quirks[i].vendor == dev->vendor &&
23772375
(ohci_quirks[i].device == dev->device ||
@@ -2398,13 +2396,15 @@ static int __devinit pci_probe(struct pci_dev *dev,
23982396
ohci->ir_context_channels = ~0ULL;
23992397
ohci->ir_context_mask = reg_read(ohci, OHCI1394_IsoRecvIntMaskSet);
24002398
reg_write(ohci, OHCI1394_IsoRecvIntMaskClear, ~0);
2401-
size = sizeof(struct iso_context) * hweight32(ohci->ir_context_mask);
2399+
n_ir = hweight32(ohci->ir_context_mask);
2400+
size = sizeof(struct iso_context) * n_ir;
24022401
ohci->ir_context_list = kzalloc(size, GFP_KERNEL);
24032402

24042403
reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, ~0);
24052404
ohci->it_context_mask = reg_read(ohci, OHCI1394_IsoXmitIntMaskSet);
24062405
reg_write(ohci, OHCI1394_IsoXmitIntMaskClear, ~0);
2407-
size = sizeof(struct iso_context) * hweight32(ohci->it_context_mask);
2406+
n_it = hweight32(ohci->it_context_mask);
2407+
size = sizeof(struct iso_context) * n_it;
24082408
ohci->it_context_list = kzalloc(size, GFP_KERNEL);
24092409

24102410
if (ohci->it_context_list == NULL || ohci->ir_context_list == NULL) {
@@ -2432,8 +2432,11 @@ static int __devinit pci_probe(struct pci_dev *dev,
24322432
if (err)
24332433
goto fail_self_id;
24342434

2435-
fw_notify("Added fw-ohci device %s, OHCI version %x.%x\n",
2436-
dev_name(&dev->dev), version >> 16, version & 0xff);
2435+
version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
2436+
fw_notify("Added fw-ohci device %s, OHCI v%x.%x, "
2437+
"%d IR + %d IT contexts, quirks 0x%x\n",
2438+
dev_name(&dev->dev), version >> 16, version & 0xff,
2439+
n_ir, n_it, ohci->quirks);
24372440

24382441
return 0;
24392442

0 commit comments

Comments
 (0)