aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-11-22 15:28:19 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-12-07 17:11:28 -0500
commitd41bba2d3adcddbdd7b5ed4d4abf07890cf6006f (patch)
tree4974018724ab633348fd1cbe6344a2e33ced6d9d /drivers/ieee1394
parent8252bbb1363b7fe963a3eb6f8a36da619a6f5a65 (diff)
ieee1394: nodemgr: spaces to tabs
whitespace pedantry Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/nodemgr.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index d90ec6de818..d2a543972c8 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -100,7 +100,7 @@ static int nodemgr_check_speed(struct nodemgr_csr_info *ci, u64 addr,
100} 100}
101 101
102static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length, 102static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length,
103 void *buffer, void *__ci) 103 void *buffer, void *__ci)
104{ 104{
105 struct nodemgr_csr_info *ci = (struct nodemgr_csr_info*)__ci; 105 struct nodemgr_csr_info *ci = (struct nodemgr_csr_info*)__ci;
106 int i, error; 106 int i, error;
@@ -319,8 +319,8 @@ static ssize_t fw_drv_show_##field (struct device_driver *drv, char *buf) \
319 return sprintf(buf, format_string, (type)driver->field);\ 319 return sprintf(buf, format_string, (type)driver->field);\
320} \ 320} \
321static struct driver_attribute driver_attr_drv_##field = { \ 321static struct driver_attribute driver_attr_drv_##field = { \
322 .attr = {.name = __stringify(field), .mode = S_IRUGO }, \ 322 .attr = {.name = __stringify(field), .mode = S_IRUGO }, \
323 .show = fw_drv_show_##field, \ 323 .show = fw_drv_show_##field, \
324}; 324};
325 325
326 326
@@ -541,7 +541,7 @@ static ssize_t fw_show_drv_device_ids(struct device_driver *drv, char *buf)
541 int length = 0; 541 int length = 0;
542 char *scratch = buf; 542 char *scratch = buf;
543 543
544 driver = container_of(drv, struct hpsb_protocol_driver, driver); 544 driver = container_of(drv, struct hpsb_protocol_driver, driver);
545 545
546 for (id = driver->id_table; id->match_flags != 0; id++) { 546 for (id = driver->id_table; id->match_flags != 0; id++) {
547 int need_coma = 0; 547 int need_coma = 0;
@@ -708,8 +708,8 @@ fail:
708 708
709static int nodemgr_bus_match(struct device * dev, struct device_driver * drv) 709static int nodemgr_bus_match(struct device * dev, struct device_driver * drv)
710{ 710{
711 struct hpsb_protocol_driver *driver; 711 struct hpsb_protocol_driver *driver;
712 struct unit_directory *ud; 712 struct unit_directory *ud;
713 struct ieee1394_device_id *id; 713 struct ieee1394_device_id *id;
714 714
715 /* We only match unit directories */ 715 /* We only match unit directories */
@@ -725,25 +725,25 @@ static int nodemgr_bus_match(struct device * dev, struct device_driver * drv)
725 return 0; 725 return 0;
726 726
727 driver = container_of(drv, struct hpsb_protocol_driver, driver); 727 driver = container_of(drv, struct hpsb_protocol_driver, driver);
728 for (id = driver->id_table; id->match_flags != 0; id++) { 728 for (id = driver->id_table; id->match_flags != 0; id++) {
729 if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) && 729 if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) &&
730 id->vendor_id != ud->vendor_id) 730 id->vendor_id != ud->vendor_id)
731 continue; 731 continue;
732 732
733 if ((id->match_flags & IEEE1394_MATCH_MODEL_ID) && 733 if ((id->match_flags & IEEE1394_MATCH_MODEL_ID) &&
734 id->model_id != ud->model_id) 734 id->model_id != ud->model_id)
735 continue; 735 continue;
736 736
737 if ((id->match_flags & IEEE1394_MATCH_SPECIFIER_ID) && 737 if ((id->match_flags & IEEE1394_MATCH_SPECIFIER_ID) &&
738 id->specifier_id != ud->specifier_id) 738 id->specifier_id != ud->specifier_id)
739 continue; 739 continue;
740 740
741 if ((id->match_flags & IEEE1394_MATCH_VERSION) && 741 if ((id->match_flags & IEEE1394_MATCH_VERSION) &&
742 id->version != ud->version) 742 id->version != ud->version)
743 continue; 743 continue;
744 744
745 return 1; 745 return 1;
746 } 746 }
747 747
748 return 0; 748 return 0;
749} 749}
@@ -852,16 +852,16 @@ static void nodemgr_update_bus_options(struct node_entry *ne)
852#endif 852#endif
853 quadlet_t busoptions = be32_to_cpu(ne->csr->bus_info_data[2]); 853 quadlet_t busoptions = be32_to_cpu(ne->csr->bus_info_data[2]);
854 854
855 ne->busopt.irmc = (busoptions >> 31) & 1; 855 ne->busopt.irmc = (busoptions >> 31) & 1;
856 ne->busopt.cmc = (busoptions >> 30) & 1; 856 ne->busopt.cmc = (busoptions >> 30) & 1;
857 ne->busopt.isc = (busoptions >> 29) & 1; 857 ne->busopt.isc = (busoptions >> 29) & 1;
858 ne->busopt.bmc = (busoptions >> 28) & 1; 858 ne->busopt.bmc = (busoptions >> 28) & 1;
859 ne->busopt.pmc = (busoptions >> 27) & 1; 859 ne->busopt.pmc = (busoptions >> 27) & 1;
860 ne->busopt.cyc_clk_acc = (busoptions >> 16) & 0xff; 860 ne->busopt.cyc_clk_acc = (busoptions >> 16) & 0xff;
861 ne->busopt.max_rec = 1 << (((busoptions >> 12) & 0xf) + 1); 861 ne->busopt.max_rec = 1 << (((busoptions >> 12) & 0xf) + 1);
862 ne->busopt.max_rom = (busoptions >> 8) & 0x3; 862 ne->busopt.max_rom = (busoptions >> 8) & 0x3;
863 ne->busopt.generation = (busoptions >> 4) & 0xf; 863 ne->busopt.generation = (busoptions >> 4) & 0xf;
864 ne->busopt.lnkspd = busoptions & 0x7; 864 ne->busopt.lnkspd = busoptions & 0x7;
865 865
866 HPSB_VERBOSE("NodeMgr: raw=0x%08x irmc=%d cmc=%d isc=%d bmc=%d pmc=%d " 866 HPSB_VERBOSE("NodeMgr: raw=0x%08x irmc=%d cmc=%d isc=%d bmc=%d pmc=%d "
867 "cyc_clk_acc=%d max_rec=%d max_rom=%d gen=%d lspd=%d", 867 "cyc_clk_acc=%d max_rec=%d max_rom=%d gen=%d lspd=%d",
@@ -954,7 +954,7 @@ static struct node_entry *find_entry_by_guid(u64 guid)
954 } 954 }
955 up(&nodemgr_ne_class.sem); 955 up(&nodemgr_ne_class.sem);
956 956
957 return ret_ne; 957 return ret_ne;
958} 958}
959 959
960 960
@@ -1416,22 +1416,22 @@ static void nodemgr_node_scan_one(struct host_info *hi,
1416 1416
1417static void nodemgr_node_scan(struct host_info *hi, int generation) 1417static void nodemgr_node_scan(struct host_info *hi, int generation)
1418{ 1418{
1419 int count; 1419 int count;
1420 struct hpsb_host *host = hi->host; 1420 struct hpsb_host *host = hi->host;
1421 struct selfid *sid = (struct selfid *)host->topology_map; 1421 struct selfid *sid = (struct selfid *)host->topology_map;
1422 nodeid_t nodeid = LOCAL_BUS; 1422 nodeid_t nodeid = LOCAL_BUS;
1423 1423
1424 /* Scan each node on the bus */ 1424 /* Scan each node on the bus */
1425 for (count = host->selfid_count; count; count--, sid++) { 1425 for (count = host->selfid_count; count; count--, sid++) {
1426 if (sid->extended) 1426 if (sid->extended)
1427 continue; 1427 continue;
1428 1428
1429 if (!sid->link_active) { 1429 if (!sid->link_active) {
1430 nodeid++; 1430 nodeid++;
1431 continue; 1431 continue;
1432 } 1432 }
1433 nodemgr_node_scan_one(hi, nodeid++, generation); 1433 nodemgr_node_scan_one(hi, nodeid++, generation);
1434 } 1434 }
1435} 1435}
1436 1436
1437 1437
@@ -1597,7 +1597,7 @@ static void nodemgr_node_probe(struct host_info *hi, int generation)
1597 if (ne->needs_probe) 1597 if (ne->needs_probe)
1598 nodemgr_probe_ne(hi, ne, generation); 1598 nodemgr_probe_ne(hi, ne, generation);
1599 } 1599 }
1600 up(&nodemgr_ne_class.sem); 1600 up(&nodemgr_ne_class.sem);
1601 1601
1602 1602
1603 /* If we had a bus reset while we were scanning the bus, it is 1603 /* If we had a bus reset while we were scanning the bus, it is
@@ -1841,10 +1841,10 @@ int nodemgr_for_each_host(void *__data, int (*cb)(struct hpsb_host *, void *))
1841 1841
1842void hpsb_node_fill_packet(struct node_entry *ne, struct hpsb_packet *pkt) 1842void hpsb_node_fill_packet(struct node_entry *ne, struct hpsb_packet *pkt)
1843{ 1843{
1844 pkt->host = ne->host; 1844 pkt->host = ne->host;
1845 pkt->generation = ne->generation; 1845 pkt->generation = ne->generation;
1846 barrier(); 1846 barrier();
1847 pkt->node_id = ne->nodeid; 1847 pkt->node_id = ne->nodeid;
1848} 1848}
1849 1849
1850int hpsb_node_write(struct node_entry *ne, u64 addr, 1850int hpsb_node_write(struct node_entry *ne, u64 addr,
@@ -1922,7 +1922,7 @@ int init_ieee1394_nodemgr(void)
1922 1922
1923void cleanup_ieee1394_nodemgr(void) 1923void cleanup_ieee1394_nodemgr(void)
1924{ 1924{
1925 hpsb_unregister_highlevel(&nodemgr_highlevel); 1925 hpsb_unregister_highlevel(&nodemgr_highlevel);
1926 1926
1927 class_unregister(&nodemgr_ud_class); 1927 class_unregister(&nodemgr_ud_class);
1928 class_unregister(&nodemgr_ne_class); 1928 class_unregister(&nodemgr_ne_class);