aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2010-02-21 11:59:14 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-02-24 14:36:55 -0500
commit6fdb2ee243404c7cbf530387bf904ad1841ebf5b (patch)
treef4a3cec81b7dc416b38d7b107ff60ac5c42ad463
parent4802f16d512d6e3b36177709d50c05df0ef52a6c (diff)
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>
-rw-r--r--drivers/firewire/ohci.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index a387bcd62466..75dc6988cffd 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -2329,7 +2329,7 @@ static int __devinit pci_probe(struct pci_dev *dev,
2329 struct fw_ohci *ohci; 2329 struct fw_ohci *ohci;
2330 u32 bus_options, max_receive, link_speed, version; 2330 u32 bus_options, max_receive, link_speed, version;
2331 u64 guid; 2331 u64 guid;
2332 int i, err; 2332 int i, err, n_ir, n_it;
2333 size_t size; 2333 size_t size;
2334 2334
2335 ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); 2335 ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
@@ -2370,8 +2370,6 @@ static int __devinit pci_probe(struct pci_dev *dev,
2370 goto fail_iomem; 2370 goto fail_iomem;
2371 } 2371 }
2372 2372
2373 version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
2374
2375 for (i = 0; i < ARRAY_SIZE(ohci_quirks); i++) 2373 for (i = 0; i < ARRAY_SIZE(ohci_quirks); i++)
2376 if (ohci_quirks[i].vendor == dev->vendor && 2374 if (ohci_quirks[i].vendor == dev->vendor &&
2377 (ohci_quirks[i].device == dev->device || 2375 (ohci_quirks[i].device == dev->device ||
@@ -2398,13 +2396,15 @@ static int __devinit pci_probe(struct pci_dev *dev,
2398 ohci->ir_context_channels = ~0ULL; 2396 ohci->ir_context_channels = ~0ULL;
2399 ohci->ir_context_mask = reg_read(ohci, OHCI1394_IsoRecvIntMaskSet); 2397 ohci->ir_context_mask = reg_read(ohci, OHCI1394_IsoRecvIntMaskSet);
2400 reg_write(ohci, OHCI1394_IsoRecvIntMaskClear, ~0); 2398 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;
2402 ohci->ir_context_list = kzalloc(size, GFP_KERNEL); 2401 ohci->ir_context_list = kzalloc(size, GFP_KERNEL);
2403 2402
2404 reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, ~0); 2403 reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, ~0);
2405 ohci->it_context_mask = reg_read(ohci, OHCI1394_IsoXmitIntMaskSet); 2404 ohci->it_context_mask = reg_read(ohci, OHCI1394_IsoXmitIntMaskSet);
2406 reg_write(ohci, OHCI1394_IsoXmitIntMaskClear, ~0); 2405 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;
2408 ohci->it_context_list = kzalloc(size, GFP_KERNEL); 2408 ohci->it_context_list = kzalloc(size, GFP_KERNEL);
2409 2409
2410 if (ohci->it_context_list == NULL || ohci->ir_context_list == NULL) { 2410 if (ohci->it_context_list == NULL || ohci->ir_context_list == NULL) {
@@ -2432,8 +2432,11 @@ static int __devinit pci_probe(struct pci_dev *dev,
2432 if (err) 2432 if (err)
2433 goto fail_self_id; 2433 goto fail_self_id;
2434 2434
2435 fw_notify("Added fw-ohci device %s, OHCI version %x.%x\n", 2435 version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
2436 dev_name(&dev->dev), version >> 16, version & 0xff); 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);
2437 2440
2438 return 0; 2441 return 0;
2439 2442